Jump to content
AndroidZero

Send HTML Body with _INetSmtpMail

Recommended Posts

Hello again,

I'm using the _INetSmtpMail from <Inet.au3> but unfortunately it doesn't send <html> content.

Ofc I looked up the code in Inet.au3 and found the content-Type entry but I don't know what I have to modify to make it work. Anyone an idea ?

$aSend[4] = "From:" & $sFromName & "<" & $sFromAddress & ">" & @CRLF & _
            "To:" & "<" & $sToAddress & ">" & @CRLF & _
            "Subject:" & $sSubject & @CRLF & _
            "Mime-Version: 1.0" & @CRLF & _
            "Date: " & _DateDayOfWeek(@WDAY, 1) & ", " & @MDAY & " " & _DateToMonth(@MON, 1) & " " & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC & $iBias & @CRLF & _
            "Content-Type: text/plain; charset=US-ASCII" & @CRLF & _
            @CRLF
    $aReplyCode[4] = ""

 

Share this post


Link to post
Share on other sites

Try:

Content-Type: text/html

https://www.wikidata.org/wiki/Q8811#P1163


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) mean to do that to anybody!!!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

@TheDcoder

Wow that was simple ..😅
Thank you !!!!
Now I need to solve one last thing.

How I can display special characters "ÄÜÖäüö °!"§$$%&/()=?@€1²³456{[]}\~#-.,|" etc ?
The mails I receive and send can only display this ones !"$%&/()=?'_:;>{[]}\~|

Most important are the special letter characters "ÄÖÜ"

 

Share this post


Link to post
Share on other sites
Posted (edited)

@Nine

I checked the charset in my Outlook 2016 Client and it use "Western European (ISO)" by default.
So in the end "ISO-8859-1" was the correct charset 🕵️‍♂️

$aSend[4] = "From:" & $sFromName & "<" & $sFromAddress & ">" & @CRLF & _
            "To:" & "<" & $sToAddress & ">" & @CRLF & _
            "Subject:" & $sSubject & @CRLF & _
            "Mime-Version: 1.0" & @CRLF & _
            "Date: " & _DateDayOfWeek(@WDAY, 1) & ", " & @MDAY & " " & _DateToMonth(@MON, 1) & " " & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC & $iBias & @CRLF & _
            "Content-Type: text/html; charset=ISO-8859-1" & @CRLF & _
            @CRLF
    $aReplyCode[4] = ""

This community is the best !

Edited by AndroidZero

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...