Jackized Posted 11 hours ago Posted 11 hours ago (edited) These settings work in Powershell but in Autoit 3.3.18.0 I get error:2. I also get an error:1 if no attachment or if I take AttachFiles completely out of the script. The password with or without spaces doesn't change anything. #include <SmtpMailer.au3> Local $s_SmtpServer = "smtp.gmail.com" Local $s_FromName = "My Name" Local $s_FromAddress = "fromme@gmail.com" Local $s_ToAddress = "tome@gmail.com" Local $s_Subject = "Subject" Local $s_Body = "Body Message" Local $s_Username = "fromme@gmail.com" Local $s_Password = "abcdefghijklmnop" ; <--- Generated App Password Local $s_AttachFiles = "C:\1.txt" Local $IPPort = 587 ; Use 465 for SSL or 587 for TLS Local $ssl = 1 ; Set to 1 for SSL Local $s_Result = _SMTP_SendEmail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $s_Body, $s_Username, $s_Password, $s_AttachFiles, $IPPort, $ssl) If @error Then MsgBox(0, "Error", "Mail failed with error: " & @error) Else MsgBox(0, "Success", "Mail sent!") EndIf Mail failed with error:2 Edited 7 hours ago by Jos
Nine Posted 9 hours ago Posted 9 hours ago (edited) Just tested it. Working on my side with/without attachments. (ssl = 1, port = 465) ps. when you post code, please use method shown in the link, thanks. Edited 9 hours ago by Nine “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
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