Odoo Help

3

How can I set custom from and reply-to addresses in email templates?

By
Javier Fuentes
on 4/5/13, 7:34 AM 4,763 views

Hi,

I have been making tests to set up some email templates to contact our clients. These are the addressing settings I am using for one of these templates:

From: ${object-user_id.email}

To (Emails): ${object.email}

To (Partners): ${object.id}

Reply-To:

These are my questions:

  • The e-mail is correctly sent, but the from address when the email is received shows the outgoing email address of the system and not the email of the user. How could I set the From field so that the user's address is shown?
  • I would like to address the potential responses to an email alias (i.e. marketing@mydoamin.com) so that a lead is created when anyone answers the mail. How could I set this alias address (marketing@mydomain.com) in the Reply-to field?

Thank you very much. Regards,

Javier

1
Javier Fuentes
On 4/8/13, 8:18 AM

Thank you very much for your response GEM. I am not sure I've understood well the solution your have proposed. Following your comment, this is how I have configured the addressing information of the template:

From: (blank)

To (Emails): ${object.email}

To (Partners): ${object.id}

Reply-To: marketing@mydomain.com

I have sent a sample email using this template as one of the users of the system and this is what I have obtained:

  • Sender address is still the e-mail of the configured outgoing mail address (not the address of the user sending the email)
  • If a try to reply-to the received e-mail, the destination address is the address of the user.

What am I doing wrong?

Thank you for your time. Regards,

Javier

1
Cyril Gaspard (GEM)
On 4/6/13, 9:09 AM

Hi,

user should have an email given in his account, no need to enter a value in field FROM, see the code :

    'email_from': fields.char('From',
        help="Sender address (placeholders may be used here). If not set, the default "
                "value will be the author's email alias if configured, or email address."),

to have a different address for the reply, give the value address you want in field reply to.

    'reply_to': fields.char('Reply-To', help="Preferred response address (placeholders may be used here)"),

Bye

0

Any one show is interested and fall o this question, here is how you do it in xml:

<record id="yourdirectory.yourprefered_id" model="mail.template">

<field name="email_from">info@yourcompany.com</field>

  <field name="reply_to">info@yourcompany.com</field>

  <field name="email_to">${object.model_field_representing_email}</field>

  <field name="subject">bla bla bla</field>

...

</record>

0
Dale
On 7/28/13, 4:30 PM

Thanks for this thread. Tell me please, I want to create a template that is available from the drop down when sending a new mail by clicking the envelope icon next to the user name in the top right corner. What is the correct model to add the template to so that it appears in this drop down?

thanks

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 4/5/13, 7:34 AM
Seen: 4763 times
Last updated: 8/17/17, 1:17 PM