phpmailer

PHPMailer User Attachments

别说谁变了你拦得住时间么 提交于 2020-01-11 12:29:08
问题 I'm attempting to create a form that sends an email with user populated data. So far everything send correctly however the attachment is never included in the email sent. Any help would be appreciated. HTML form asking user for data. "Mailerindex.html" <html> <head> <link rel ="stylesheet" type = "text/css" href = "style.css" /> </head> <div class="form-style-8"> <body> <form action= "PHPMailer.php" method ="POST" id="from" enctype="multipart/form-data"> <input type="text" name="fname"

Cannot redeclare PHPMailerAutoload()?

坚强是说给别人听的谎言 提交于 2020-01-11 12:19:58
问题 I start implementing a function of Emailing mass users, When I click on post the I get the following error. Cannot redeclare PHPMailerAutoload() (previously declared in C:\xampp\htdocs\bloodbank2\phpmailer\PHPMailerAutoload.php:24) in C:\xampp\htdocs\bloodbank2\phpmailer\PHPMailerAutoload.php on line 31 However the first user in the database is able to receive the Email and the rest dont. Here are my codes. 1st one is news.php, which allows person to post the news. <?php include 'core/init

PHP Mailer taking over 30 seconds to send a welcome email

独自空忆成欢 提交于 2020-01-11 11:11:51
问题 So I am using the PHPMailer library in PHP to send a welcome email when ever my users registered, and it takes so long to do this. It takes around 30 - 50 seconds to actually load the home page, after clicking submit on the registration. It basically puts the page in a reloading state for over 30 seconds. The code I use is below... if ($config['user']['welcome_email_enabled']) $autoLoader->getLibrary('mail')->sendWelcomeEmail($email, $username); And my mail library is here. <?php /** *

how to send mail with phpmailer class?

我们两清 提交于 2020-01-11 07:13:13
问题 I created a phpMailer class and call it into my register.php file all fine. But dont find a way how to send emails from class. Here is my class: class mailSend { public function sendMail($email, $message, $subject) { require_once('PHPMailer/src/Exception.php'); require_once('PHPMailer/src/PHPMailer.php'); require_once('PHPMailer/src/SMTP.php'); $mail = new PHPMailer\PHPMailer\PHPMailer(); try { $mail->SMTPDebug = 0; $mail->isSMTP(); $mail->Host = "smtp.gmail.com"; $mail->SMTPAuth = true;

how to send mail with phpmailer class?

一曲冷凌霜 提交于 2020-01-11 07:13:01
问题 I created a phpMailer class and call it into my register.php file all fine. But dont find a way how to send emails from class. Here is my class: class mailSend { public function sendMail($email, $message, $subject) { require_once('PHPMailer/src/Exception.php'); require_once('PHPMailer/src/PHPMailer.php'); require_once('PHPMailer/src/SMTP.php'); $mail = new PHPMailer\PHPMailer\PHPMailer(); try { $mail->SMTPDebug = 0; $mail->isSMTP(); $mail->Host = "smtp.gmail.com"; $mail->SMTPAuth = true;

SMTP connection failed

爱⌒轻易说出口 提交于 2020-01-08 05:15:23
问题 I'm facing this issue from last three days, before this script worked perfectly. Now getting error: SMTP ERROR: Failed to connect to server: (0) 2017-10-06 21:05:34 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Message was not sent.Mailer error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting ahsanazhar12@gmail.com Here is my script: require 'PHPMailer/PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->SMTPDebug = 2; /

SMTP connection failed

≡放荡痞女 提交于 2020-01-08 05:14:26
问题 I'm facing this issue from last three days, before this script worked perfectly. Now getting error: SMTP ERROR: Failed to connect to server: (0) 2017-10-06 21:05:34 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Message was not sent.Mailer error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting ahsanazhar12@gmail.com Here is my script: require 'PHPMailer/PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->SMTPDebug = 2; /

Send php mail to user if form submitted

末鹿安然 提交于 2020-01-07 03:24:09
问题 I am trying to use the phpmail function to send an email to a user if their post was accepted. First I am capturing the user email in a query if a form is submitted, but I'm not sure how to implement the mail function. Should it be something like this?: if(isset($_POST ['submit'])){ //Some query to get the user email address $results = $dbh->prepare("select $user_email from wp_users where wp_users.ID=$user_ID"); $to=$results; $subject="Whatever you want your subject to be"; $headers = "From:

Google SMTP Error: Could not authenticate

萝らか妹 提交于 2020-01-06 20:17:37
问题 The following code does not work once i put it on the server, I have similar code working on my local environment and it works perfectly, any ideas? edit: i did set my gmail setting to "less secure" <?php $setid = $_POST['setid']; $promo = $_POST['promo']; echo "Good Sir, your set ID is ".$setid.", and you are eligible for the following deal:"; echo "<br><br>"; echo $promo; $message= "Good Sir, your set ID is ".$setid.", and you are eligible for the following deal:"."<br><br>".$promo; require

Google SMTP Error: Could not authenticate

冷暖自知 提交于 2020-01-06 20:17:29
问题 The following code does not work once i put it on the server, I have similar code working on my local environment and it works perfectly, any ideas? edit: i did set my gmail setting to "less secure" <?php $setid = $_POST['setid']; $promo = $_POST['promo']; echo "Good Sir, your set ID is ".$setid.", and you are eligible for the following deal:"; echo "<br><br>"; echo $promo; $message= "Good Sir, your set ID is ".$setid.", and you are eligible for the following deal:"."<br><br>".$promo; require