0

I want to send emails without using an actual account so this is what I have so far

    $mail = new PHPMailer;
    $mail->Sender = BOUNCE_EMAIL;
    $mail->setFrom($fromAddress,str_replace("\"", "",$fromName));
    $mail->addAddress($toAddress,$toName);
    $mail->addReplyTo($replyAddress);
    $mail->MessageID = $mailHash;

    $mail->isHTML(true);

    $mail->CharSet = 'UTF-8';
    $mail->Subject = $subject;
    $mail->Body    = $htmlBody ;
    $mail->AltBody = $textBody;

I can send emails but I will never receive a bounced email. Is there something I can do to receive bounces using phpmailer but not to use an account?

Shakaib
  • 1
  • 2

1 Answers1

0

Bounces are not especially straightforward to handle through PHP especially if you can't use an inbox - consider reading through the following answers.

If you were using an inbox you could set the Return-Path to the return address.

Might be worth your time to try/look at various php bounce solutions such as PHPMailer, PHP-Bounce-Handler, phpList, etc. I've no experience with them but looking through their solutions may provide some assistance.

Community
  • 1
  • 1
Syeknom
  • 86
  • 4