FORMS, validating mail was sent - Page 3

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: FORMS, validating mail was sent

On Friday, June 21, 2013 1:40:40 AM UTC+8, Twayne wrote:
Quoted text here. Click to load it
Quoted text here. Click to load it

I really like using PHPMailer, Create a mailer object with whatever setting
s you like, I usually run mine through gmail since I don't send many and th
ey're mostly to myself.

$mail = new PHPMailer();
$mail = $this->mail;
// enables SMTP debug information (for testing) // 1 = errors and message
s // 2 = messages only
// $mail->SMTPDebug = 2;
$mail->SMTPAuth = true;
$mail->Host = 'ssl://';
$mail->IsHTML(true); // send as HTML
$mail->Username = $account;
$mail->Password = $password;
$mail->FromName = $from;
$mail->Subject = $subject;
$mail->Body = $message; //HTML Body
    echo "Mailer Error: " . $mail->ErrorInfo;
} else {
    echo "Message sent!";

It gives Error messages, but what types and to what extend you might have t
o check yourself. But if you're using a foreign SMTP server it should be si
mpler to verify the message was sent, but you wont really know if it was re


If you're just wanting to get user input for your own use and not sending d
ata to others, you could simply add the data to a database - which you can  
confirm - then send an email with a link to yourself to view it. This way e
ven if you don't receive the email you still have the data on the server. (
You could also send the data in the email and store it on the server).


With a rather undetailed question as to your purposes and requirements, thi
s is maybe the most helpful info I can provide while make some assumptions.

Site Timeline