user2710234
user2710234

Reputation: 3235

PHPMailer emails not sending but there are no errors

I am using PHPMailer and using this PHP Code to send emails:

$email = new PHPMailer();

            while($result2=mysql_fetch_array($rs2))
            {
                $email->AddAttachment( $result2["attachment"] , basename($result2["attachment"]) );
            }

            $email->From      = 'Integra Digital';
            $email->FromName  = $result["emailfrom"];
            $email->Subject   = $result["subject"];
            $email->Body      = $result["message"];

            $email->AddAddress($result["emailto"]);
            $email->IsHTML(true);

if(!$email->Send())
            {
                echo "<strong>Mailer Error: </strong>" . $email->ErrorInfo;
            }
            else
            {
                echo '<strong>Email sent to: </strong>' .implode(',',$emails_list). '<br/ >';
            }

$result["emailto"] is equal to a valid email address but i am not receiving the emails

any ideas?

Upvotes: 0

Views: 1705

Answers (1)

user2710234
user2710234

Reputation: 3235

looks like it wanted the AddAttachment part after everything else and just before the Send function

Upvotes: 1

Related Questions