Hi,
I'm using Access 2007,
I send emails to a recipient from a combobox "id_destinatario_cd11" using a routine which takes the sender email address from another combobox "id_mittente_cd11".
in the code portion below, if I write:
With objMsg
Set .Configuration = objConf
.BodyPart.Charset = "utf-8"
.To = Me!id_destinatario_cd11.Column(6)
.FROM = Me!id_mittente_cd11.Column(5)
.......
it works regulary, but the recipient receives as sender "ufficio.pratice" and not "Dott. Mario Rossi", which is the sender's name.
I tried this:
With objMsg
Set .Configuration = objConf
.BodyPart.Charset = "utf-8"
.To = Me!id_destinatario_cd11.Column(6)
.FROM = "Dott Mario Rossi <ufficio.pratiche@azienda.it>
and it works fine, recipient receives the email from "Dott Mario Rossi".
Because of I choose sender from the combobox id_mittente_cd11, I tried this:
With objMsg
Set .Configuration = objConf
.BodyPart.Charset = "utf-8"
.To = Me!id_destinatario_cd11.Column(6)
.FROM = """Dott Mario Rossi"" <Me!id_mittente_cd11.Column(5)>"
but the server answers "wrong sender".
Which is the right sintax in your opinion?
Thank you very much
REgards