Phpmailer Mailer Error Could Not Instantiate Mail Function
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have
Could Not Instantiate Mail Function Wordpress
Meta Discuss the workings and policies of this site About Us phpmailer could not instantiate mail function windows Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with could not instantiate mail function phpmailer localhost us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just
Wordpress Phpmailer Could Not Instantiate Mail Function
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 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
Codeigniter Could Not Instantiate Mail Function
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 edited Mar 1 '12 at 19:25 Josh 5,81542536 asked Aug 18 '09 at 23:20 sdfor 2,36183754 1 Similar question: stackoverflow.com/questions/1944631/… –Mukesh Chapagain Aug 22 '11 at 8:26 Than mean PHPmailer try to use build in mail function from PHP not SMTP –Userpassword Aug 25 '15 at 19:55 add
Sign in Pricing Blog Support Search GitHub This repository Watch 656 Star 7,312 Fork 4,188 PHPMailer/PHPMailer Code Issues 48 Pull requests 11 Projects 0 Wiki Pulse Graphs New issue uncaught exception 'phpmailerexception' with message 'could not instantiate mail function Could not instantiate mail function. Message could not be sent.Mailer Error: Could not
Could Not Instantiate Mail Function Joomla
instantiate mail function. #508 Closed ricksherm opened this Issue Sep 24, 2015 · 2 comments Projects None yet could not instantiate mail function localhost Labels None yet 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 http://stackoverflow.com/questions/1297084/phpmailer-error-could-not-instantiate-mail-function Error: Could not instantiate 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 https://github.com/PHPMailer/PHPMailer/issues/508 encryption, `ssl` also accepted $mail->Port = 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
to be processed by a new instance of PHPMailer but this is where problems start to emerge. Namely just one problem, an error of "Could not instantiate mail function.". I'm aware https://www.sitepoint.com/community/t/phpmailer-famous-could-not-instantiate-mail-function-error/5807 this is a very popular problem and the answer is usually SMTP settings (from what I see online) however I'm somewhat confused where to look in the code. I'm testing this offline in the http://www.fox.ra.it/forum/24-troubleshooting/443-error-message-could-not-instantiate-mail-function.html WAMP Apache environment which shouldn't make a difference and I've also downloaded the latest version of PHPMailer (5.1) to which my code connects to (PHPMailer is in the folder "PHPMailer" in the root directory could not of the website files). I would appreciate some pointers where should I be looking to fix this before I go uploading it. Do I just need to pass the SMTP settings in the mail setup below? Since SMTP doesn't authenticate whether the email address I sent from is genuine I should be able to pass it anything such as 123@abc.com right? I don't think it's the port number could not instantiate as then it would say something like "cannot connect to smtp server" as far as I remember back from early 2009 when I had a similar albeit different problem. Here's the code in the page that processes the details ready to send off: is_valid) { $error['captcha'] = "Please enter the correct CAPTCHA text from the displayed image."; $count = $count + 1; } if (!$error && $resp->is_valid) { require_once('phpMailer/class.phpmailer.php'); $mail = new PHPMailer(); $mail->From = $email; $mail->FromName = $name; $mail->Subject = "Contact test"; $mail->AddAddress($site_owners_email, $site_owners_name); $mail->AddAddress('info@webs
username? Create an account Forum Fox Contact Form Documentation Troubleshooting Error Message Could not instantiate mail function Error Message Could not instantiate mail function StartPrev1NextEnd 1 Demis [Fox-Labs] Topic Author Offline Less More Posts: 3335 Thank you received: 445 12 May 2011 09:03 #1 See "Common solution with some Internet Service Providers" at the bottom This error is raised by phpmailer software (see call stack below), and it means that php mail() function on your server has failed. There is no way to know why, other then seeing in the system log (accessible only to system administrator). On Linux, this is usually /var/log/messages or /var/log/syslog. Apache doesn't log such errors, because it doesn't know the meaning of the /usr/sbin/sendmail numeric return codes, and Postfix doesn't log it in /var/log/mail.log because the email never arrives to the MTA . Solution Change the "Mailer" option in your Joomla Mail configuration to "Sendmail" or "SMTP", and hope that a different error doesn't appear. Go to Joomla "Site" -> "Global configuration" -> "Server" tab -> "Mail Settings" section -> "Mailer" field. Change the value "PHP Mail" with "Sendmail" or "SMTP". Doing the operation explained above, you are about to change the call stack from the standard value: "Fox Contact Form" -> "Joomla Mailer subsystem" -> "phpmailer software" -> "php mail() function" to "Fox Contact Form" -> "Joomla Mailer subsystem" -> "phpmailer software" -> "sendmail program" or "Fox Contact Form" -> "Joomla Mailer subsystem" -> "phpmailer software" -> "SMTP TCP socket" Common causes On windows wamp / xampp local environments, php mail() function never works after a standard installation, until you don't set properly the following values in php.ini, and then restart apache service.[mail function] SMTP = put your SMTP server here s