jellyfish Posted March 5, 2008 Share Posted March 5, 2008 Please help. I cant get this to send the body of the email. I am a Super Noob so be patient please.CODECODE#include <GUIConstants.au3> #include <INet.au3> $Form1 = GUICreate("Form1", 633, 447, 193, 125) $SmtpServer = GUICtrlCreateInput("smtp", 68, 19, 460, 21) $FromName = GUICtrlCreateInput("name", 74, 54, 460, 21) $FromAddress = GUICtrlCreateInput("from", 69, 90, 460, 21) $ToAddress = GUICtrlCreateInput("to", 76, 133, 460, 21) $Subject = GUICtrlCreateInput("subj", 74, 175, 460, 21) $Body = GUICtrlCreateInput("Input6", 50, 229, 490, 81) $button1 = GUICtrlCreateButton("Button1", 342, 354, 171, 41, 0) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button1 $s_SmtpServer = GUICtrlRead($SmtpServer) $s_FromName = GUICtrlRead ($FromName) $s_FromAddress = GUICtrlRead($FromAddress) $s_ToAddress = GUICtrlRead($ToAddress) $s_Subject = GUICtrlRead($Subject) $as_Body = GUICtrlRead($Body) $send = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) $err = @error If $send = 1 Then MsgBox(0, "Success!", "Your mail has been sent to " & $s_ToAddress) Else MsgBox(0, "Error!", "Mail failed with error code " & $err) EndIf EndSelect Wend Link to comment Share on other sites More sharing options...
Developers Jos Posted March 5, 2008 Developers Share Posted March 5, 2008 The Body field should be an Array. check the helpfile example on how thats done. 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. 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