Forums / Setup & design / Setting from/reply-to address in e-mails sent to a field in objects or forms submitted
Kjell Knudsen
Friday 27 August 2004 2:12:21 am
What file would I go to to find this?
I'd like to make it so that my users can just reply to e-mails they get through the site. Without having to replace my/system from e-mail address with the one found inside the message.
Is there a email_sender option just like email_receiver? How to use?
If not - where's the file in the kernel that communicates with sendmail?
-kjell
Kjell Knudsen http://www.icbl.org
Ole Morten Halvorsen
Monday 30 August 2004 4:59:03 am
Kjell,
In site.ini:
[MailSettings] # The address which will be set as the sender of the e-mail as default EmailSender=
You can find the code for sending mails in lib/ezutils/classes/ezmail.php and lib/ezutils/classes/ezmailtransport.php
Ole M.
Senior Software Engineer - Vision with Technology http://www.visionwt.com http://www.omh.cc http://www.twitter.com/omh eZ Certified Developer http://ez.no/certification/verify/358441 http://ez.no/certification/verify/272578
Monday 30 August 2004 6:08:14 am
thanks Ole Morten,
so if I don't set that value in site.ini it will use some value in the form?
Monday 30 August 2004 7:15:04 am
If EmailSender is not set it will try AdminEmail instead.
From lib/ezutils/classes/ezsendmailtransport.php: function sendMail( &$mail ) { $ini =& eZINI::instance(); $emailSender = $ini->variable( 'MailSettings', 'EmailSender' ); if ( !$emailSender ) $emailSender = $ini->variable( 'MailSettings', 'AdminEmail' ); ...
Monday 30 August 2004 7:31:42 am
ok - had a look at this and see that it should be feasible to setup to use a field from the content class to specify the from address. Ie I want to have it so that when users give feedback on a news article online or use online contact form they come up as the sender.
But am a bit at loss as to exactly how to use - is there an easy FAQ or something for this?