Odoo Help

Welcome!

This community 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.

3

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

By
Javier Fuentes
on 4/5/13, 7:34 AM 3,865 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)

--Cyril Gaspard (GEM)--
4136
| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

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
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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/5/13, 7:34 AM
Seen: 3865 times
Last updated: 3/16/15, 8:10 AM