I feel thet should be simple but I can't find the answer in the forum.
I want to send an email with HTML body, but I know nothing about HTML.
So what I'm, trying to do is :
1) write the email in Outlook.
2) Save the email with "file, Save as HTML"
3) put the file in the object folder
4) load the file as a string in B4j and use it as HTML body.
Of course it does not works .... The email is sent but the body is empty
This is my code:
I want to send an email with HTML body, but I know nothing about HTML.
So what I'm, trying to do is :
1) write the email in Outlook.
2) Save the email with "file, Save as HTML"
3) put the file in the object folder
4) load the file as a string in B4j and use it as HTML body.
Of course it does not works .... The email is sent but the body is empty
This is my code:
B4X:
Dim SMTP As SMTP
SMTP.Initialize("smtps.xxx.it",465,"[email protected]","xxx","smtp")
SMTP.MailFrom="[email protected]"
SMTP.HtmlBody=True
SMTP.Body=File.ReadString(File.DirApp,"senza nome.htm")
Log(SMTP.Body) ' yes, I see all the HTML body in the log
SMTP.Subject="test subject"
SMTP.To.Add ("[email protected]")
SMTP.UseSSL=True
SMTP.AuthMethod=SMTP.AUTH_LOGIN
SMTP.Send