water Posted April 20, 2012 Share Posted April 20, 2012 I use _InetSmtpMail to send a message incuding some special characters (german "umlaut" like öäü) in the body from a Windows 2008 R2 SP1 (english) server to a Windows 7 (german) PC running Outlook 2010. Unfortunately all special characters are displayed as "?" (question mark). When I run MsgBox with Umlauts they are displayed correctly on the server. So I think it looks like a problem with _INetSmtpMail, Exchange, Outlook. Is there anything I can do about it? Thanks in advance! My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 20, 2012 Moderators Share Posted April 20, 2012 Purely out of curiosity, to narrow the issue, what happens when you try the same thing from the Win7 machine? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
water Posted April 20, 2012 Author Share Posted April 20, 2012 Unfortunately I can't test because our security policy doesn't allow to send mails from my Windows 7 machine (only allowed program is Outlook). My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
abrgen Posted September 8, 2016 Share Posted September 8, 2016 On 20/4/2012 at 9:15 PM, water said: Unfortunately I can't test because our security policy doesn't allow to send mails from my Windows 7 machine (only allowed program is Outlook). Hi all, I have the same problem, I can see the symbol "€", always I get "?". I have tried to use the character € and chr(128) but it's always the same result. I use windows 10 and gmail account. Is there someone who has got the solution? Best regards. Link to comment Share on other sites More sharing options...
abrgen Posted September 8, 2016 Share Posted September 8, 2016 On 20/4/2012 at 9:31 AM, water said: I use _InetSmtpMail to send a message incuding some special characters (german "umlaut" like öäü) in the body from a Windows 2008 R2 SP1 (english) server to a Windows 7 (german) PC running Outlook 2010. Unfortunately all special characters are displayed as "?" (question mark). When I run MsgBox with Umlauts they are displayed correctly on the server. So I think it looks like a problem with _INetSmtpMail, Exchange, Outlook. Is there anything I can do about it? Thanks in advance! Hi all, I have the same problem, I can see the symbol "€", always I get "?". I have tried to use the character € and chr(128) but it's always the same result. I use windows 10 and gmail account. Is there someone who has got the solution? Best regards. Link to comment Share on other sites More sharing options...
jchd Posted September 8, 2016 Share Posted September 8, 2016 Converting the text (and/or setting the mail program) to UTF8 should cure the issue. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
abrgen Posted September 8, 2016 Share Posted September 8, 2016 Hi All, I have solved the problem: Just add before to send the mail: $objEmail.BodyPart.Charset = "iso-8859-15" ; You need to add this line if you want to use the € symbol $objEmail.Fields.Update ;Sent the Message $objEmail.Send I used the funtion _INetSmtpMailCom mentioned here: Link to comment Share on other sites More sharing options...
Doniel Posted June 10, 2022 Share Posted June 10, 2022 (edited) On 4/20/2012 at 9:31 AM, water said: I use _InetSmtpMail to send a message incuding some special characters (german "umlaut" like öäü) in the body from a Windows 2008 R2 SP1 (english) server to a Windows 7 (german) PC running Outlook 2010. Unfortunately all special characters are displayed as "?" (question mark). When I run MsgBox with Umlauts they are displayed correctly on the server. So I think it looks like a problem with _INetSmtpMail, Exchange, Outlook. Is there anything I can do about it? Thanks in advance! Hi everyone, I know I'm late on this, but I'd still like to share my solution that I haven't found anywhere else on the web/forum and also answers the actual question of this thread: Sending german umlaute / umlauts with _INetSmtpMail() I checked the include folder (usually C:\Program Files\AutoIt3\Include) where Inet.au3 is located. In there you'll find the function _INetSmtpMail() in Line 128. Now if you search that function carefully, you'll find this part: $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 Notice the charset=US-ASCII This is causing the behaviour of changing all umlauts to a question mark, because US-ASCII doesn't know them. If you change this to what @abrgen posted.. On 9/8/2016 at 11:44 PM, abrgen said: $objEmail.BodyPart.Charset = "iso-8859-15" ; You need to add this line if you want to use the € symbol .. or to Latin-9 (it's the same charset), the issue will be resolved I also tried to write UTF-8 there, but for some reason it's not resolving the issue For me this was the better solution. Also remember, that if you change the Inet.au3 locally and you re-install AutoIt or change your PC, the Inet.au3 File will have charset=US-ASCII in it again. A parameter for _INetSmtpMail() to change the charset would be helpful. Have a nice day. Edited July 6, 2022 by Doniel Typo “It is only when a mosquito lands on your testicles that you realize there is always a way to solve problems without using violence.” ― Confucius Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now