Good afternoon,
is it possible to send mail with images inside a table?
like this:
here is my code:
any ideas?
thanks in advanced.
is it possible to send mail with images inside a table?
like this:
here is my code:
B4X:
SMTP.Initialize("smtp.gmail.com", 587, "##########@gmail.com", "###########", "SMTP")
SMTP.StartTLSMode = True
SMTP.AuthMethod=SMTP.AUTH_LOGIN
SMTP.To.Add("#####@########")
SMTP.Subject = "Encomenda Fornecedor : " & (FORNECEDOR)
SMTP.HtmlBody=True
Dim corpo,corpo1,corpo2,corpo3,corpo4,corpo5,corpo6,corpo7 As String
corpo="<html><body><style>p{font-family:verdana;display: block;margin: 8px;font-size:12px } table{border: 1px solid black; border-collapse: collapse;}th { border: 1px solid black; padding: 10px; font-family:verdana; font-size:13px; background-color:#c2c2c2;}td { border: 1px solid black; padding: 10px; text-align: left; font-family:verdana; font-size:10px; vertical-align: midlle;} .invisivel { border: 0px solid white; padding: 0px;}</style>"
corpo1= "<p>Boa tarde,"& "<br/><br/>"
corpo2= "Segue os dados da encomenda do Fornecedor:" & FORNECEDOR & "<br/><br/><br/></p> "
corpo3 = "<table id=t01>"
corpo4 = "<tr><th>Fotografia</th><th>Referencia</th><th>Nome</th><th>Designação</th><th>Ref. Fornecedor</th><th>Preço Custo</th><th>Quantidade</th><th>Observações</th><th>Estado</th></tr>"
For i = 0 To lista_artigos_mail.size-1
Dim partir() As String=Regex.Split("\|",lista_artigos_mail.Get(i))
corpo5 =corpo5 & "<tr><td><img src=???????????????? & partir(0).Trim&"0.jpg"& "></td><td>" & partir(0) & "</td><td>" & partir(1) & "</td><td>" & partir(2) & "</td><td>" & partir(3) & "</td><td>" & partir(4) & "</td><td>" & partir(5) & "</td><td>" & partir(6) & "</td><td>" & partir(7) & "</td></tr>"
SMTP.AddAttachment(File.DirRootExternal,"############/imagens/" & partir(0).Trim&"0.jpg")
Next
corpo6 = "</table><br><br/><br/><p>Com os melhores cumprimentos/best regards," & "<br/><br/>"
corpo7 = "Filipe Ferreira"& "<br/></p> "
corpo=corpo & corpo1 &corpo2 &corpo3 & corpo4 &corpo5 & corpo6 &corpo7
SMTP.Body=corpo
SMTP.Send
the mail is sent with the images attached, but they don't show on table like the next picture
any ideas?
thanks in advanced.