Jump to content
Sign in to follow this  

How to send input box info to a smtp Server?

Recommended Posts


Ok I am making a GUI which required you to fill in 3 input boxes with some information, and I was all 3 of those input boxes info to be sent to a smtp server. Anyway to make it send all 3 of the imput boxes to the smtp?

Share this post

Link to post
Share on other sites

Here is an untested modified example from the help file to get you started...

#include <INet.au3>

; Modified help file _INetSmtpMail example 

$s_SmtpServer = "mysmtpserver.com.au" 
$s_FromName = InputBox("From Name", "Enter From Name", "")
$s_FromAddress = InputBox("From Email Address", "Enter From Email Address", "")
$s_ToAddress = InputBox("To eMail Address", "Enter To eMail Address", "")
$s_Subject = InputBox("Subject", "Enter Subject", "")
Dim $as_Body[2]
$as_Body[0] = InputBox("Body Line 1", "Enter Line 1", "")
$as_Body[1] = InputBox("Body Line 2", "Enter Line 2", "")
$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)
;MsgBox(0, "Debug", $s_fromname & " -- " & $s_FromAddress & " -- " & $s_ToAddress & " -- " & $s_Subject) ;<<< Testing only
$err = @error
If $Response = 1 Then
    MsgBox(0, "Success!", "Mail sent")
    MsgBox(0, "Error!", "Mail failed with error code " & $err)


Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.