Saturday 15 January 2011

Phpmailer smtp 500 error hosting error -



Phpmailer smtp 500 error hosting error -

i'm trying utilize phpmailer. @ first script worked internal server error 500 when execute script. doing wrong? here's script:

require('class.phpmailer.php'); require("class.smtp.php"); $mail = new phpmailer(); $mail->issmtp(); $mail->host = 'mx1.hostinger.nl'; $mail->smtpdebug = true; $mail->smtpauth = true; $mail->host = 'mx1.hostinger.nl'; $mail->port = 2525; $mail->username = 'email'; $mail->password = 'password'; $mail->setfrom('email', 'name'); $mail->addreplyto('email','name'); $mail->addaddress($email); $mail->subject = 'kortingsbon aanmelding name nieuwsbrief'; $mail->altbody = 'to view message, please utilize html compatible email viewer!'; $mail->ishtml(true); $mail->body = '<table width="100%"; rules="all" style="border:1px solid #3a5896;" cellpadding="10"><tr><td><img src="logolocation/logo.png" alt="alttekst" /></td></tr><tr><td colspan=2>beste klant,<br /><br />bedankt voor uw aanmelding voor onze nieuwsbrief met e-mailadres <strong>'.$email.'</strong>. <br />hieronder vindt u de kortingsbon. print deze kortingbon uit zodat u gebruik kunt maken van deze actie bij uw volgende aankoop. wij hopen u binnenkort weer te begroeten in onze winkel!</td></tr><tr><td colspan=2><i>wordt uw kortingsbon hieronder niet weegegeven? klik dan op inhoud toestaan, vertrouw afzender of afbeeldingen weergeven bij uw e-mailprogramma.</i> <br /> <img height="488" width="650" src="picturre/'.$maand.'.jpg" alt="kortingscode foto" /></td></tr><tr><td colspan=2>dit een automatische e-mail en u kunt er daarom niet op reageren. <p style="font-size: 10px">u kunt zich altijd weer <a href="website">uitschrijven</a></p></td></tr></table>'; $mail->send(); if (!$mail->send()) { $mail->errorinfo; }

this:

$mail->errorinfo;

that simple syntax error - can't type property name , hope something. alter this:

echo $mail->errorinfo;

while you're there, update latest phpmailer.

smtp phpmailer

No comments:

Post a Comment