/home/desid573/ov.desidrivers.com.au/mailer/PHPMailer_5.2.0/examples
NameSizeModeActions
images/-0755rm
contents.html7850644editdlrm
index.html26680644editdlrm
test_db_smtp_basic.php21870644editdlrm
test_mail_advanced.php11690644editdlrm
test_mail_basic.php10110644editdlrm
test_pop_before_smtp_advanced.php13760644editdlrm
test_pop_before_smtp_basic.php11530644editdlrm
test_sendmail_advanced.php12110644editdlrm
test_sendmail_basic.php10840644editdlrm
test_smtp_advanced.php18420644editdlrm
test_smtp_advanced_no_auth.php14730644editdlrm
test_smtp_basic.php18610644editdlrm
test_smtp_basic_no_auth.php15060644editdlrm
test_smtp_gmail_advanced.php19110644editdlrm
test_smtp_gmail_basic.php19170644editdlrm
Edit: /home/desid573/ov.desidrivers.com.au/mailer/PHPMailer_5.2.0/examples/test_db_smtp_basic.php (2187B)
PHPMailer - MySQL Database - SMTP basic test with authentication IsSMTP(); // telling the class to use SMTP $mail->Host = "smtp1.site.com;smtp2.site.com"; $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPKeepAlive = true; // SMTP connection will not close after each email sent $mail->Host = "mail.yourdomain.com"; // sets the SMTP server $mail->Port = 26; // set the SMTP port for the GMAIL server $mail->Username = "yourname@yourdomain"; // SMTP account username $mail->Password = "yourpassword"; // SMTP account password $mail->SetFrom('list@mydomain.com', 'List manager'); $mail->AddReplyTo('list@mydomain.com', 'List manager'); $mail->Subject = "PHPMailer Test Subject via smtp, basic with authentication"; @MYSQL_CONNECT("localhost","root","password"); @mysql_select_db("my_company"); $query = "SELECT full_name, email, photo FROM employee WHERE id=$id"; $result = @MYSQL_QUERY($query); while ($row = mysql_fetch_array ($result)) { $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test $mail->MsgHTML($body); $mail->AddAddress($row["email"], $row["full_name"]); $mail->AddStringAttachment($row["photo"], "YourPhoto.jpg"); if(!$mail->Send()) { echo "Mailer Error (" . str_replace("@", "@", $row["email"]) . ') ' . $mail->ErrorInfo . '
'; } else { echo "Message sent to :" . $row["full_name"] . ' (' . str_replace("@", "@", $row["email"]) . ')
'; } // Clear all addresses and attachments for next loop $mail->ClearAddresses(); $mail->ClearAttachments(); } ?>