Sign in to follow this  
Followers 0
jellyfish

Email Question (brand Noob)

2 posts in this topic

Please help. I cant get this to send the body of the email. I am a Super Noob so be patient please.

CODE
CODE
#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

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  
Followers 0