Jump to content
Sign in to follow this  
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


A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

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

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

@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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...