Firefox PHP

Module: Author as Sender

Re: Module: Author as Sender
June 01, 2010 04:31PM
In your Mailing List module, we can define the From address. But this Author as Sender overrides that.

I want to define the from address in the Mailing List module, but still reference the Authors name.

Such as...

From: mailist_list_from_address@mysite.com <User Display Name>

Right now I am getting...

From: system_email_address@mysite.com <User Display Name>

How can I get this to work to display the members display name in the From field, but retain the From email address from the Mailing List Module?


Robert Angle
Phorum lover, nothing more.
Ruminations
Re: Module: Author as Sender
June 02, 2010 04:27AM
Hi Robert,

Quote
Robert Angle
In your Mailing List module, we can define the From address. But this Author as Sender overrides that.

Please try new version 1.4.1:

2010/06/02 version 1.4.1 Oliver Riesen (oliver@riesen.org)
- Making module compatible with Mailing List Module; thanks to Robert Angle.

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Author as Sender
June 02, 2010 08:46AM
Tested and works great! Thanks :)


Robert Angle
Phorum lover, nothing more.
Ruminations
Re: Module: Author as Sender
June 22, 2010 03:20AM
New version 1.4.2:

2010/06/22 version 1.4.2 Oliver Riesen (oliver@riesen.org)
- Bug fix: Remove extraneous stuff from email addresses to avoid double
  name part in some cases.


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Author as Sender
July 14, 2010 10:47PM
Sorry for the duplicate post--I posted this over at the Mailing List module thread, too. I'm not sure where is better, but in any case...

Hello, all. Thanks for the hard work you all put in. I've run through all the forums, and the code itself, and I'm still having trouble figuring out one minor issue. I would like outgoing emails from phorum, which go to a Mailman list, to appear to be sent from the posting party, not from the system email default. I have tried "Author as Sender", and it doesn't appear to substitute the author of the post for the system email default when it sends to the Mailman list. I suspect I'm not setting up something right, but this is the last piece of the puzzle for me to move over to Phorum, other than trying to figure out how to import a phpBB2 board. That's another day. Thanks for any help.
Re: Module: Author as Sender
July 15, 2010 01:08AM
Quote
deadesq
I would like outgoing emails from phorum, which go to a Mailman list, to appear to be sent from the posting party, not from the system email default. I have tried "Author as Sender", and it doesn't appear to substitute the author of the post for the system email default when it sends to the Mailman list. I suspect I'm not setting up something right, but this is the last piece of the puzzle for me to move over to Phorum, other than trying to figure out how to import a phpBB2 board. That's another day. Thanks for any help.

Hello,

It is working for me, but please note the following.

Since my admin settings are to hide all email addresses, everything gets sent as from the system email address, OR the email address I specify for the FROM address in the mailing list module.

However, if my admin settings did not force the hiding of all email addresses, then the Author as Sender module would use the users email address that he has on file, UNLESS the user was opting to hide it himself in his Control Panel, in which case, the system email or the one specified in the mailing list module would be used.

Hope that is not too confusing, but in short, the users email address should be used UNLESS the user is choosing to hide it, or your system wide defaults are set to hide all addresses.


Robert Angle
Phorum lover, nothing more.
Ruminations
Re: Module: Author as Sender
July 15, 2010 01:15AM
Thanks, Robert.

The emails are not globally set to "hide", and the test user I've set up is not set to hide either. The system is still sending from the global system email, though.

I'm wondering if it's something having to do with the SMTP send module I'm using. If I change the system-wide email address to a fake address (foo@foo.com for example), it won't send to the Mailman system. It seems to choke at that point, and the log is showing an error in the send. If I turn off the SMTP module, it doesn't send to Mailman at all. I can't find where to do the settings to have it just use the php mailer instead of the SMTP module, but I'll keep looking. Frustrating.
Re: Module: Author as Sender
July 15, 2010 01:42AM
Okay--further information. I am not able to edit the php.ini on my server (shared hosting) so I remember now that's why I am using the SMTP module. I suspect that may be part of the problem. I will continue searching through the code, but if that rings a bell for you at all, I'll be very appreciative.
Re: Module: Author as Sender
July 15, 2010 02:01AM
Quote
deadesq
I'm wondering if it's something having to do with the SMTP send module I'm using. If I change the system-wide email address to a fake address (foo@foo.com for example), it won't send to the Mailman system. It seems to choke at that point, and the log is showing an error in the send. If I turn off the SMTP module, it doesn't send to Mailman at all. I can't find where to do the settings to have it just use the php mailer instead of the SMTP module, but I'll keep looking. Frustrating.

Just a random thought (which usually means nothing)... could it be that it appears to not send to Mailman because foo@foo.com is not a real subscriber of the Mailman list?

I am not using the SMTP module, so I cannot comment further.


Robert Angle
Phorum lover, nothing more.
Ruminations
Re: Module: Author as Sender
July 15, 2010 01:38PM
Quote
deadesq
I'm wondering if it's something having to do with the SMTP send module I'm using. If I change the system-wide email address to a fake address (foo@foo.com for example), it won't send to the Mailman system. It seems to choke at that point, and the log is showing an error in the send. If I turn off the SMTP module, it doesn't send to Mailman at all. I can't find where to do the settings to have it just use the php mailer instead of the SMTP module, but I'll keep looking. Frustrating.

I encountered what looks to be this same problem several months ago and fixed it by hacking the SMTP module. I no longer have access to the system to provide a patch, but still have my notes:

--- Start SMTP module hacks ---
Reason: To allow the predefined "from" address that is sent to the module to be used.
Explanation: Currently the "from" address in the module is set to the system email from address. Modules such as mailinglist (and presumably author as sender) allow the user to define their own "from" address, which this module promptly overrides.

edit the file: mods/smtp_mail/smtp_mail.php
Find:
$mail->From = $PHORUM['system_email_from_address'];
$mail->Sender = $PHORUM['system_email_from_address'];
$mail->FromName = $PHORUM['system_email_from_name'];

Replace those three lines with:
if(!isset($data['from']) || empty($data['from'])) {
$mail->From = $PHORUM['system_email_from_address'];
$mail->Sender = $PHORUM['system_email_from_address'];
$mail->FromName = $PHORUM['system_email_from_name'];
} else {
$mail->From = $data['from'];
$mail->Sender = $data['from'];
$mail->FromName = $data['from'];
}

--- End SMTP module hacks ---

I hope this is still relevant and helps to solve your problem.
Sorry, only registered users may post in this forum.

Click here to login