Mailer Error Could Not Instantiate Mail
Contents |
here for a quick overview of the site Help Center could not instantiate mail function phpmailer Detailed answers to any questions you might have Meta
Could Not Instantiate Mail Function Wordpress
Discuss the workings and policies of this site About Us Learn more about Stack Overflow codeigniter could not instantiate mail function the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Could Not Instantiate Mail Function Phpmailer Localhost
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up phpmailer error “Could not instantiate mail function” up vote 11 down vote favorite 3 I'm using the wordpress phpmailer could not instantiate mail function mail() basic example modified slightly for my user id and I'm getting the error "Mailer Error: Could not instantiate mail function" if I use the mail function - mail($to, $subject, $message, $headers); it works fine, though I'm having trouble sending html, which is why I'm trying PHPMailer. this is the code: AddReplyTo("reply@domain.com","my name"); $mail->SetFrom('from@domain.com', 'my name'); $address = "to@domain.com"; $mail->AddAddress($address, "her name"); $mail->Subject = "PHPMailer Test Subject via mail(), basic"; $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; $mail->MsgHTML($body); $mail->AddAttachment("images/phpmailer.gif"); // attachment $mail->AddAttachment("images/phpmailer_mini.gif"); // attachment if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message sent!"; } ?> php email phpmailer share|improve this question ed
Sign in Pricing Blog Support Search GitHub This repository Watch 656 Star 7,284 Fork 4,174 PHPMailer/PHPMailer Code Issues 49 Pull requests 11 Projects 0 Wiki Pulse Graphs New issue Could
Phpmailer Could Not Instantiate Mail Function Windows
not instantiate mail function. Message could not be sent.Mailer Error: Could not instantiate mail
Could Not Instantiate Mail Function Joomla
function. #508 Closed ricksherm opened this Issue Sep 24, 2015 · 2 comments Projects None yet Labels None yet could not instantiate mail function mailpoet Milestone No milestone Assignees No one assigned 3 participants ricksherm commented Sep 24, 2015 example.php error message: "Could not instantiate mail function. Message could not be sent.Mailer Error: Could not instantiate http://stackoverflow.com/questions/1297084/phpmailer-error-could-not-instantiate-mail-function mail function." SMTPDebug = 3; // Enable verbose debug output // $mail->isSMTP(); // Set mailer to use SMTP $mail->CharSet="iso-8859-1"; $mail->Host = 'smtp.netins.net'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'myname'; // SMTP username $mail->Password = 'mypassword'; // SMTP password $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted $mail->Port https://github.com/PHPMailer/PHPMailer/issues/508 = 587; // TCP port to connect to $mail->From = 'from@example.com'; $mail->FromName = 'Mailer'; $mail->addAddress('ricksherman@netins.net'); // Add a recipient $mail->addReplyTo('info@example.com'); $mail->addCC('cc@example.com'); $mail->addBCC('bcc@example.com'); // $mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments // $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name $mail->isHTML(true); // Set email format to HTML $mail->Subject = 'Here is the subject'; $mail->Body = 'This is the HTML message body in bold!'; $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; if(!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent'; } ?> ivantcholakov commented Sep 24, 2015 Hm, this line is commented: $mail->isSMTP(); // Set mailer to use SMTP PHPMailer member Synchro commented Sep 24, 2015 Please read the docs before posting. Synchro closed this Sep 24, 2015 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. Terms Privacy Security Status Help You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
recommend our users to contact their host if this issue persists. If it can't be solved by your host, we usually recommend sending from a professional provider. http://docs.mailpoet.com/article/56-could-not-instantiate-mail-function Based on our experience it can be: you are on a local server (localhost) recipient's email address is invalid there's a special character in the subject there's a special character in the sender/receiver information the subject line is too long the bounce address you specified is not accepted by your server you already sent too many emails 1. You are on a local server (using could not WAMP for example) This kind of web server does not have a mail server so you can't send emails from your local server. Solution: send with an external SMTP server instead. 2. Your receiver email address is not valid Your mail server may refuse to deliver your message if the receiver email address is not a valid one. If you have " could not could not instantiate instantiate mail function" for only a few of your subscribers, it may just be because their email address is not valid! 3. You included a special character in the subject line Some mail servers will refuse to deliver your message if it contains special characters in the subject such as a quote or a comma or any other kind of special character (ù,ï,ä)... Solution: create a new newsletter, specify a standard subject line ("test" for example) and give it a try. 4. You included a special character in the sender/receiver information The same way, some mail server will refuse to deliver your message if the sender information contain special characters. Solution: remove special chars from a single subscriber to see if that solves the issue. 5. Your subject line is too long Some mail server may not authorize you to deliver your message if the subject line is too long. Solution: shorten your subject line to a single word to make sure it's not a problem of subject length. 6. The bounce address you specified is not accepted by your server Some servers won't accept to deliver your message if you specify