Setting from/reply-to address in e-mails sent to a field in objects or forms submitted

Author Message

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

Kjell Knudsen

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?

-kjell

Kjell Knudsen
http://www.icbl.org

Ole Morten Halvorsen

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' );
...

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

Kjell Knudsen

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?

-kjell

Kjell Knudsen
http://www.icbl.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:15:29
Script start
Timing: Jan 18 2025 19:15:29
Module start 'layout'
Timing: Jan 18 2025 19:15:29
Module start 'content'
Timing: Jan 18 2025 19:15:31
Module end 'content'
Timing: Jan 18 2025 19:15:31
Script end

Main resources:

Total runtime1.4930 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.4063152.6875
Module start 'layout' 0.00590.0032 741.093839.6172
Module start 'content' 0.00901.4824 780.7109557.0313
Module end 'content' 1.49140.0016 1,337.742216.0313
Script end 1.4930  1,353.7734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2333160.0002
Check MTime0.00140.0960160.0001
Mysql Total
Database connection0.00070.045810.0007
Mysqli_queries1.426895.5666630.0226
Looping result0.00070.0457610.0000
Template Total1.456597.620.7283
Template load0.00250.165520.0012
Template processing1.454097.390820.7270
Template load and register function0.00020.010710.0002
states
state_id_array0.00260.175410.0026
state_identifier_array0.00090.063220.0005
Override
Cache load0.00170.1157300.0001
Sytem overhead
Fetch class attribute can translate value0.00180.117420.0009
Fetch class attribute name0.00180.123360.0003
XML
Image XML parsing0.00060.042220.0003
class_abstraction
Instantiating content class attribute0.00000.001180.0000
General
dbfile0.00090.0597160.0001
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs