• Resolved A31

    (@a31)


    Good Day,
    I hope that someone can assist me.

    I know that after the 4.6.1 update their has been some changes to the mailer etc. and after much googling I found some answers.

    The problem I now face (after turning on error logging) is that it seems to cut off the last part of my domain on my return e-mail address:

    So the real email address is: [email protected]
    But in the error log it shows the following:
    “The mail server could not deliver mail to [email protected]. The account or domain may not exist,…”

    So as you can see the “ZA” is dropped or removed from the e-mail address.

    The way I currently define it in my phpmailer action is:

    $mailer->Username = “[email protected]”;

    Can you please assist me in resolving this issue?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    There’s many possible ways to use PHPMailer. Are you using wp_mail() to actually send (or try to send anyway) the message? If so, the recommended way to set the From: address is through the ‘wp_mail_from’ filter. (and ‘wp_mail_from_name’ to set the From: name if you don’t want it to be “WordPress”) It sounds like some other code is attempting to sanitize the From: address and screwed it up. To increase the chance of working around this bad code, hook the filter with a high numbered priority so your callback hopefully has the last say in the matter.

    If that doesn’t work, you’re going to have to track down the errant code. Deactivate all plugins and switch to a default twenty* theme. You should find using the ‘wp_mail_from’ filter works fine now. Switch back to your normal theme, then test again. Activate each plugin one by one, testing after each. When the email fails again, the last activated code is the problem. Take up the issue with the author of that code. If you get no author response, you’ll need to read through the code and hope to find the problem portion and correct it.

    Thread Starter A31

    (@a31)

    Thank you very much for your reply.
    You pointed me in the right direction and I managed to fix it.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHPMailer – Email Address Cut Off’ is closed to new replies.