Results 1 to 3 of 3
  1. #1
    linoreale is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Oct 2014
    Posts
    10

    send email with Name

    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

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    Try:

    .FROM = "Dott Mario Rossi <" & Me.id_mittente_cd11.Column(5) & ">"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    linoreale is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Oct 2014
    Posts
    10
    Thank you very very much!
    Kind regards!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Send email using CDO, get email addresses from table
    By marvinac1 in forum Programming
    Replies: 3
    Last Post: 12-22-2014, 12:54 PM
  2. Replies: 5
    Last Post: 05-07-2014, 09:25 AM
  3. Send a PDF via email.
    By tcheck in forum Access
    Replies: 3
    Last Post: 08-30-2011, 02:31 PM
  4. Replies: 4
    Last Post: 04-13-2011, 10:11 AM
  5. send email to email addresses in database?
    By cnstarz in forum Access
    Replies: 5
    Last Post: 03-02-2011, 09:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums