PDA

View Full Version : Set Sender different than From



reynolds5520
24-Apr-2007, 12:53 AM
I have read and reread the configuration notes for From_User and Set_Sender_From_Email and it looks like I can only configure FormMail to set the sender to match the from if needed but not send sender and from seperately.

I would like to define sender as something like formmail@mydomain.com while the from is the email field from the form. Can it be done?


Kevin

russellr
24-Apr-2007, 01:20 AM
Hi,

This is so incredibly complicated!

The difficulty has been that many servers don't obey standards and they also have a myriad of mechanisms for processing outgoing mail.

The good news is that we do have plans to sort out the complexity as much as possible, and probably provide more flexibility as well.

Anyway....to answer your question...

The "sender" is not part of the email headers - it's inferred by the server's email processing software.

The "sender" is either taken from the "From" line of the email or must be specified by the SENDMAIL_F_OPTION feature (or the INI_SET_FROM feature for Windows servers).

The SENDMAIL_F_OPTION only works if your server uses it (i.e. some servers).

INI_SET_FROM only works on some Windows servers.

This means that FormMail can only specify the Sender on a few servers (using SENDMAIL_F_OPTION or INI_SET_FROM).

Therefore it hasn't made sense for us to implement a feature that sets the sender differently to the from address.

Hence, this means that FormMail only deals with the From address.

In short, no, you can only get FormMail to set the sender as being the From address.

If it helps, you can rename the "email" field so that it gets treated as non-special and will be included in the from results. Alternatively, keep the "email" field and use the DupHeader option to mail_options.

If none of this helps, then the last resort is to use FormMail's Hook System to override some of the processing to get what you want (using PHP).

reynolds5520
24-Apr-2007, 01:47 AM
This is so incredibly complicated!

The "sender" is not part of the email headers - it's inferred by the server's email processing software.

Now I understand. With all the different server configurations/packages out there it WOULD be difficult. My limited experience with Majordomo and Sendmail made me think it would be trivial. Thanks for the enlightenment!



The good news is that we do have plans to sort out the complexity as much as possible, and probably provide more flexibility as well.

I will look forward to seeing what the future brings.

Your suggestion to include the email outside the headers is what I am doing now and works well enough for me. I was just hoping to make the resulting email a bit more user friendly for some day in the future when the form recipient is someone else.

Thanks for the thorough reply.

Kevin

girlpower
30-May-2007, 11:42 AM
This is complicated!

I was looking for a solution for setting From because Gmail likes to send form emails to spam. I wanted to set the from so that I could add it to Gmail contacts. I looked at SENDMAIL_F_OPTION but could not decipher whether or not this would provide the solution.

Anyone have a suggestion?

russellr
30-May-2007, 08:56 PM
Hi,

You want FromAddr in mail_options: http://www.tectite.com/fmdoc/creating_forms.php