MakzNovice Posted April 9, 2020 Posted April 9, 2020 Experts, I am using _INetsmtpMail method and it works wonderfully for me. But the problem is, I am not sure how can I have some hyperlink or font variation/color variation in email body. Example : in below code I would like to have fifth line as hyperlink to some page ( say www.google.com) and sixth (last) line as smaller font with red color ( like warning) #include <Inet.au3> #include <MsgBoxConstants.au3> Local $s_SmtpServer = "mysmtpserver.com.au" Local $s_FromName = "My Name" Local $s_FromAddress = "From eMail Address" Local $s_ToAddress = "To eMail Address" Local $s_Subject = "My Test UDF" Local $as_Body[6] $as_Body[0] = "Hello MakzNovice," $as_Body[1] = "" $as_Body[2] = "Can you do this for me?" $as_Body[3] = "" $as_Body[4] = "Some Hyperlink 'here'" $as_Body[5] = "small font with Red color text here" Local $iResponse = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) Local $iErr = @error If $iResponse = 1 Then MsgBox($MB_SYSTEMMODAL, "Success!", "Mail sent") Else MsgBox($MB_SYSTEMMODAL, "Error!", "Mail failed with error code " & $iErr) EndIf Any guidelines or help will be highly appreciated. Cheers !!! It doesn't get easier, you just get better...
seadoggie01 Posted April 9, 2020 Posted April 9, 2020 I highly suggest using Jos' SMTP Mailer here: (it supports HTML by default) All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types
MakzNovice Posted April 17, 2020 Author Posted April 17, 2020 @seadoggie01 The problem is it needs user id and password as mandatory fields, which is where my problem lies. It doesn't get easier, you just get better...
seadoggie01 Posted April 17, 2020 Posted April 17, 2020 44 minutes ago, MakzNovice said: where my problem lies Could you explain what your problem is? Why is putting in your username and password an issue? All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types
Nine Posted April 17, 2020 Posted April 17, 2020 There is a few topics related to sending HTML body with _INetSmtpMail, like this one : “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Developers Jos Posted April 17, 2020 Developers Posted April 17, 2020 1 hour ago, MakzNovice said: @seadoggie01 The problem is it needs user id and password as mandatory fields, which is where my problem lies. This is only the case when the target site requires it, so there is no UDF requirement at all for these fields! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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