php - Fatal Error in PHPMailer -


There is a beginning here

I have already tested the forum to find the answer but I Was not successful, other questions were especially on some parts of PHPMailer, but I'm more normal, so I hope no one will mark my question as a duplicate because I'm in a learning curve.

I am working on a PHP project. How does it work that the user goes to the page and clicks any comments or issues in a form (such as text editor) and send button I should be able to get my message in my email. Is set here for testing purposes, but later it will be my real email with my own domain.

Here is an error that I am getting when running on the local host:

Fatal error: The unsolicited exception of the message 'phpmailerException' 'could not be executed : / Usr / sbin / sendmail 'in C: \ xampp \ htdocs \ PP \ classes \ class.phpmailer.php: 1100 Stack Trace: # 0C: \ xampp \ htdocs \ pp \ classes \ class.phpmailer.php (1026): PHPMailer-> Sendmail Send ('Date: Master, 9 OC ​​...', '--b1_9ea0b33e3f ...') # 1C: \ xampp \ htdocs \ pp \ classes \ class.phpmailer.php (935): PHPMailer- & gt; ; PostSend () # 2

Here's the code I'm using:

   setfrum (mj@gmail.com', 'mj team'); $ mail- & gt; AddReplyTo (Mej@gmail.com ',' mj team '); $ mail- & gt; theme =' new bug report for portal '; $ Mail- & gt; AltBody =' To view messages, please enter an HTML compatible email Use the viewer! '; // Optional - The message HTML will automatically create alternate mail mail- & gt; Message HTML ($ entity); $ Mail & gt; Send (); // and I accept this part of the code Yes, it runs a window based on Google search - mail-> IsSMTP (); $ Mail- & gt; SMTPAuth = true; $ mail- & gt; host = "smtp.postmarkapp.com"; $ Mail - & gt; Port = 26; $ Mail- & gt; Username = "MJ"; $ Mail- & gt; password = "mj"; $ mail- & gt; setfram (table @ gmail.com ',' mj ' ); $ Mail- & gt; subject = "an email to test"; $ mail-> AddAddress ($ address, $ name); if ($ mail) {$ message = 'Thanksgiving bug report was sent successfully If we have more questions then we will be in touch. '; } And {echo "mailer error:" $ Mail & gt; ErrorInfo; }}? & Gt;   

Just as additional information I was not able to find any user and pass for SMTP, so I was just filled with my name, which is clearly not true needed. Since I'm starting up, I appreciate any comment and suggestion code that can help me run my code.

Thank you!

Try it out:

   ISSMTP (); // Client to use SMTP $ Mail-> SMTPAuth = true; // Enable SMTP authentication $ Mail- & gt; SMTPSecure = "ssl"; // Surfing sets prefix for $ mail- & gt; Host = "smtp.gmail.com"; // Set as SMTP server GMAIL-mail-> Port = 465; // Set up SMTP ports for Gmail server $ mail- & gt; Usernames = "mj@gmail.com"; // GMAIL username $ Mail- & gt; Password = "mypassword"; // GMAIL password // specific mail data $ Mail- & gt; AddAddress ($ _ session ['email'], $ _SESSION ['name']); $ Mail- & gt; Setfram (table @ gmail.com ',' mj '); $ Mail- & gt; Subject = "This is a test message"; $ Mail- & gt; Body = "an email to test"; {$ Mail- & gt; Try () (Send); Echo "Thank you. The bug report was sent successfully. If we have any more questions then we will be in touch!"; } Hold (exception $ E) {// Something was messy "mailer error: -" $ Mail & gt; ErrorInfo; }} And {echo 'essential values ​​are missing!'; }    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -