Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Post By Email: From/Reply-To Address
Avatar
chris.crabtree
Member
Free Members
sp_UserOfflineSmall Offline
Jan 21, 2013 - 3:51 pm

So I have PBE configured correctly, I think. Test Mail Server Connection works, and I can create a post via email just fine.

And when a user posts to a forum I am subscribed to, I get the PBE message with the formatting to reply back to the forum.

So far, so good.

But this email is actually coming from the default email for the site (wordpress@mydomain.com), and it seems like the From/Reply-To address should really be the same as the mailbox used to deliver it.

Because when I reply, it's just going to go to wordpress@mydomain.com and won't make it back into the forum's mailbox, and so will never get posted to the forum.

I also had the Forum/Options/Email Settings/EMail Address Settings turned on originally, and while that does let me specify the from address and name for the messages, it also is global like wordpress@mydomain.com, and therefore not forum-specific, and so suffers the same problem.

Does this make sense or am I missing something big here in the configuration?

 

Thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 21, 2013 - 4:51 pm

The important item will be the Reply-To address which, if all goes correctly - shopuld be set to the forum email address. So can you check on that please?

andy-signature.png
YELLOW
SWORDFISH
Avatar
chris.crabtree
Member
Free Members
sp_UserOfflineSmall Offline
Jan 21, 2013 - 5:48 pm

Yes, I just checked. There is no Reply-To in the message headers at all, to any address. When I click Reply, it's addressing the message back to the global wordpress@mydomain.com address (the From header value).

 

Avatar
chris.crabtree
Member
Free Members
sp_UserOfflineSmall Offline
Jan 21, 2013 - 6:02 pm

Just to make sure I was looking for the right thing, I checked my email of this very post from the Simple Press Support forums, and sure enough the Reply-To header value is there as expected.

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 21, 2013 - 7:11 pm

sorry, I dont think you understood Andy's question...

for each forum, you have to specify the email address to use for post by email... go to forum - forums - manage groups and forums... edit each forum and see what you have in the unique post by email address...  there is one per forum...

and you need to have created that email address to on your server...

more info:  http://codex.simple-press.com/.....-by-email/

Avatar
chris.crabtree
Member
Free Members
sp_UserOfflineSmall Offline
Jan 21, 2013 - 8:00 pm

Specifically, the 'Unqiue Post by Email Address for this forum:' (sic) setting, right?

Yes, those are set with one mailbox per forum (for the two forums I am testing with), and I believe that the Test Mail Server Connection button in Forum/Options/Email Settings/Post By Email Settings uses at least one of the forum mailboxes to perform its test, doesn't it?

 

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 21, 2013 - 11:20 pm

and I assume those email addresses actually exist?

sounds like you might be on shared hosting?  wp uses that default address... you can change it on forum - options - email... to be something better...

Avatar
chris.crabtree
Member
Free Members
sp_UserOfflineSmall Offline
Jan 22, 2013 - 9:22 am

Yes, the addresses actually exist. :-)

Hosting on WPEngine, which is sort of shared from what I understand, but not like your typical shared setup. The global email address it is using is actually my domain, so it's not like a generic address or something.

Anyway, I had already changed the addresses on forum options as you suggest, before I reported this issue.

What else can I check?

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 22, 2013 - 10:36 am

I can see no logical reason why the mail header should be missing the reply-to data. The code seems OK ands this is the first report of such a thing.

Do you have any email plugins active or custom changes to the standard WP email routines?

andy-signature.png
YELLOW
SWORDFISH
Avatar
chris.crabtree
Member
Free Members
sp_UserOfflineSmall Offline
Jan 22, 2013 - 2:29 pm

No, I don't think so. I went through some of the code and tested a few ideas after turning on debug.log.

 

This is interesting. I found the sp_subscriptions_do_post_notification() function in sp-subscriptions-components.php and added a bit of code just after $replyto gets assigned. Logging the output, I saw that $replyto was blank, and so added the forum e-mail lookup. This appears to work on my first test, but surely $replyto would be assigned in this fashion anyway, wouldn't it?

# let plugins hook into this email by user
$msg = apply_filters('sph_subscriptions_notification_email', $msg, $newpost, $user);

# send the notification
$replyto = apply_filters('sph_subscriptions_email_replyto', '');

/* <cc20130122 changes> */
error_log("sp_subscriptions_do_post_notification replyto is {$replyto}\n");
if($replyto == "")
{
$replyto = spdb_table(SFFORUMS, 'forum_id='.$newpost['forumid'], 'forum_email');
}
error_log("sp_subscriptions_do_post_notification replyto was blank, now is {$replyto}\n");
/* </cc20130122 changes> */

$subject = apply_filters('sph_subscriptions_email_subject', __('Forum Post', 'sp-subs').' - '.get_option('blogname').': ['.$topicname.']', $newpost, $user);
$email_status = sp_send_email($email, $subject, $msg, $replyto);
if (!$sent && $email_status[0]) $sent = true;

 

debug.log output:

[22-Jan-2013 20:13:09] sp_subscriptions_do_post_notification replyto is

[22-Jan-2013 20:13:09] sp_subscriptions_do_post_notification replyto was blank, now is tech.support.issues@phit-n-phat.mailgun.org

[22-Jan-2013 20:13:09] sp_subscriptions_do_post_notification replyto is

[22-Jan-2013 20:13:09] sp_subscriptions_do_post_notification replyto was blank, now is tech.support.issues@phit-n-phat.mailgun.org

The newly assigned email address is the address defined in forum options.

Also curious, and perhaps related, is the fact that there are four lines logged here like the function is being called twice on a single post.

 

In the email itself, there are also two sets of reply instructions (and has been ever since I've been working the issue--it was doing this before I changed any code, in other words).

[-- To reply by email insert your text above this line - instructions below --]

[-- To reply by email insert your text above this line - instructions below --]

 

So I wonder if it is somehow getting confused by the fact that my account is a forum subscriber, forum moderator, and administrator all at once?

 

Thanks!

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625