• Resolved patbell101

    (@patbell101)


    I’ve been over and over this but the reply to is just NOT the contact email, please tell me what I am doing wrong. Using the following:

    function eme_mail_event ($event) {
    $contact = eme_get_contact ($event);
    $contact_email = $contact->user_email;
    $contact_name = $contact->display_name;

    eme_send_mail($subject,$body, ‘[email protected]’, ‘CLE_Events’, $contact_email, ‘CLE’);

    Does not use the contact email for From or Reply to instead it is using the wp admin address in Settings. The eme notification settings are all blank.

    Here is the email it sends, clearly reply to is NOT contact email
    Return-Path: <[email protected]>
    Delivered-To: [email protected]
    Received: from e20.ehosts.com
    by e20.ehosts.com with LMTP id SLYlLKjEglrb6QEAlnbhgA
    for <[email protected]>; Tue, 13 Feb 2018 04:57:44 -0600
    Return-path: <[email protected]>
    Envelope-to: [email protected]
    Delivery-date: Tue, 13 Feb 2018 04:57:44 -0600
    Received: from [178.62.53.135] (port=61826 helo=bell-computing.com.example.com)
    by e20.ehosts.com with esmtp (Exim 4.89)
    (envelope-from <[email protected]>)
    id 1elYHQ-000XhE-AE
    for [email protected]; Tue, 13 Feb 2018 04:57:44 -0600
    Received: by bell-computing.com (Postfix, from userid 1000)
    id 4B7F22010C; Tue, 13 Feb 2018 10:57:33 +0000 (UTC)
    To: [email protected]
    Subject: Event:’ test ‘
    Date: Tue, 13 Feb 2018 10:57:33 +0000
    From: CLE <[email protected]>
    Message-ID: <[email protected]>
    X-Mailer: PHPMailer 5.2.22 (https://github.com/PHPMailer/PHPMailer)
    ReplyTo: CLE <[email protected]>
    MIME-Version: 1.0
    Content-Type: text/html; charset=UTF-8
    X-Spam-Status: No, score=-91.8
    X-Spam-Score: -917
    X-Spam-Bar: —————————————————
    X-Spam-Flag: NO
    test

    14th February 2018 , 10:57 am to 14th February 2018 and 10:57 am

    Contact Person:delia

    Contact eMail:[email protected]

    Contact Phone:

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Franky

    (@liedekef)

    Which mail method do you have configured for EME?
    If not smtp, try smtp first. It seems the wp_mail method has “ReplyTo” in it, and I guess that’s a typo and needs to be “Reply-To” (in eme_mailer.php, around line 34).
    And I never use wp_mail myself, which in fact I should do more … the next version has a wp_mail fix for html-mails too (test the content of your mails via smtp, the newlines are converted to br-tags for html mail, and in the next version also wp_mail).

    Thread Starter patbell101

    (@patbell101)

    I am using the MailGun API normally, though for testing this bug I went direct using wp_mail. Reactivating MailGun as an SMTP mailer I still get the same problem. No sign of the contact (From or Reply To) except in the body of the email.

    Plugin Author Franky

    (@liedekef)

    I don’t know mailgun, but if it is not a direct smtp mailserver, they might change your email headers.
    Try a direct real smtp server, or use your wp_mail with the fix from above. And: check your mailserver logs …
    I’ll also test later this evening again, just to be sure.

    Thread Starter patbell101

    (@patbell101)

    Tried the fix and no luck with wp_mail. MailGun is a direct SMTP mailserver but that doesn’t work either.

    My users are all replying to the email notification I am sending so this is a vital issue I need to resolve.

    Plugin Author Franky

    (@liedekef)

    Tested it here with an event while changing contact person info: works just fine using smtp: the from/reply-to change when I change the event contact.
    So eme_send_mail works as expected (and in fact is just using either wp_mail or phpmailer and setting the reply-to, as can be checked in the code).
    In your case: the name is taken, but the email is not. So something else is changing your stuff (and mailgun is a mailservice and they might change the reply-to to something they know, you need to check that with them).
    Maybe some other plugin is messing with your wp_mail stuff, and mailgun might change the reply-to … so check using your local smtp mailserver and check your mail logs.
    For me this issue is closed: it works as expected (and I have several sites in fact, all work just fine with events+rsvp and their contact info using smtp).

    Thread Starter patbell101

    (@patbell101)

    Well thanks for trying. Its this that fails for me…

    function eme_mail_event ($event) {
    $contact = eme_get_contact ($event);
    $contact_email = $contact->user_email;
    $contact_name = $contact->display_name;

    eme_send_mail($subject,$body, ‘[email protected]’, ‘CLE_Events’, $contact_email, ‘CLE’);

    That seems to fail for me. Does this work for you as I have it?

    I have all (but eme) inactive and twentyseventeen theme and on a different server and site. Could it be a php bug? I’m on 7.2

    Plugin Author Franky

    (@liedekef)

    Apparently you use this to send a mail when a new event is created.
    Can you share the code to that (meaning: the filter used)?

    Plugin Author Franky

    (@liedekef)

    OMG … I’m totally blind … I so focussed on eme_send_mail, that I didn’t see this error:

    eme_get_contact should be eme_get_event_contact

    This is of course also wrong in my example doc, I already corrected it there now.

    Thread Starter patbell101

    (@patbell101)

    Perfect. Thanks for persevering. Its been a long road since my first post about this back in January but we’re there now.

    Thanks again.

    Plugin Author Franky

    (@liedekef)

    That’s why I always tell people to do a print_r in a filter-function, that would’ve trapped this problem much sooner 🙂

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Reply to ISN’T working!’ is closed to new replies.