drummernath
10-26-2009, 10:01 AM
http://img.infinityscape.co.uk/phpmailerlogo.png
Hey Indigorose, recently i came across a problem, i was unsure how to send a email from AMS, i tried various scripts and none of them seemed to work for me so i decided to have a go at making my own and php mailer was born, this handy little script allows you to send messages in 3 diffrent ways, these include;
The API
the first way you can send messages is through the scripts api, to do this you simply head on to over to the send.php where your script is located and in the address bar type;[/COLOR]YOURDOMAIN.CO.UK/send.php?to=TO&subject=SUBJECT&message=MESSAGE
The User Interface
http://img.infinityscape.co.uk/app/phpmailer/phpmailer1.png
the second way is through the user interface which is default way when you install Php Mailer, to do this simply point your browser to the place you installed Php Mailer for example; mail.YOURDOMAIN.co.uk then simply fill in the form and hit send.
Through Your Software
the final way is through your own software, to do this all you need to do is this;
to = "somebody@somecompany.co.uk"
subject = "YOUR SUBJECT"
message = "YOUR MESSAGE"
HTTP.Submit("http://mail.YOURDOMAIN.co.uk/send.php", { action="Submit", to=to, subject=subject, message=message }, SUBMITWEB_POST);
if you want to collect your information from input boxes then it will look more like this;
to = Input.GetText("to");
subject = Input.GetText("subject");
message = Input.GetText("message");
HTTP.Submit("http://mail.YOURDOMAIN.co.uk/send.php", { action="Submit", to=to, subject=subject, message=message }, SUBMITWEB_POST);
or you can just wrap the variables directly in quotes
HTTP.Submit("http://mail.YOURDOMAIN.co.uk/send.php", { action="Submit", to="to", subject="subject", message="message" }, SUBMITWEB_POST);
Sending The Email
after you have sent the email if was sucessful then you will be greeted with a page such as the following;
http://img.infinityscape.co.uk/app/phpmailer/phpmailer2.png
this will show you if the message send, and information about the message you sent, if the message failed to send then depending on the reason you will be notified
Invalid Email Address - the email address entered is invalid
Message Failed To Send, Please Try Again - no fields were filled in
Setting Up Php Mailer
in send.php you can change various settings, such as the following;
$to = $_REQUEST['to'] ;
[COLOR="YellowGreen"]$from = "noreply@infinityscape.co.uk" ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
$messagebreak = wordwrap($message, 55, "<br />", true);
Downloading Php Mailer
ok heres the good bit, the download, Php Mailer is FREE and you can grab your copy here;
Download Now (http://dl.infinityscape.co.uk/dl.php?filename=phpmailer.zip)
Price: FREE | Version: 1.0.0.0 | Filesize: 19.46KB
Please leave me a comment and let me know what you think,
thanks,
InfinityScape Team
Hey Indigorose, recently i came across a problem, i was unsure how to send a email from AMS, i tried various scripts and none of them seemed to work for me so i decided to have a go at making my own and php mailer was born, this handy little script allows you to send messages in 3 diffrent ways, these include;
The API
the first way you can send messages is through the scripts api, to do this you simply head on to over to the send.php where your script is located and in the address bar type;[/COLOR]YOURDOMAIN.CO.UK/send.php?to=TO&subject=SUBJECT&message=MESSAGE
The User Interface
http://img.infinityscape.co.uk/app/phpmailer/phpmailer1.png
the second way is through the user interface which is default way when you install Php Mailer, to do this simply point your browser to the place you installed Php Mailer for example; mail.YOURDOMAIN.co.uk then simply fill in the form and hit send.
Through Your Software
the final way is through your own software, to do this all you need to do is this;
to = "somebody@somecompany.co.uk"
subject = "YOUR SUBJECT"
message = "YOUR MESSAGE"
HTTP.Submit("http://mail.YOURDOMAIN.co.uk/send.php", { action="Submit", to=to, subject=subject, message=message }, SUBMITWEB_POST);
if you want to collect your information from input boxes then it will look more like this;
to = Input.GetText("to");
subject = Input.GetText("subject");
message = Input.GetText("message");
HTTP.Submit("http://mail.YOURDOMAIN.co.uk/send.php", { action="Submit", to=to, subject=subject, message=message }, SUBMITWEB_POST);
or you can just wrap the variables directly in quotes
HTTP.Submit("http://mail.YOURDOMAIN.co.uk/send.php", { action="Submit", to="to", subject="subject", message="message" }, SUBMITWEB_POST);
Sending The Email
after you have sent the email if was sucessful then you will be greeted with a page such as the following;
http://img.infinityscape.co.uk/app/phpmailer/phpmailer2.png
this will show you if the message send, and information about the message you sent, if the message failed to send then depending on the reason you will be notified
Invalid Email Address - the email address entered is invalid
Message Failed To Send, Please Try Again - no fields were filled in
Setting Up Php Mailer
in send.php you can change various settings, such as the following;
$to = $_REQUEST['to'] ;
[COLOR="YellowGreen"]$from = "noreply@infinityscape.co.uk" ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
$messagebreak = wordwrap($message, 55, "<br />", true);
Downloading Php Mailer
ok heres the good bit, the download, Php Mailer is FREE and you can grab your copy here;
Download Now (http://dl.infinityscape.co.uk/dl.php?filename=phpmailer.zip)
Price: FREE | Version: 1.0.0.0 | Filesize: 19.46KB
Please leave me a comment and let me know what you think,
thanks,
InfinityScape Team