Results 1 to 3 of 3

Thread: New Mail Message (Simple)

  1. #1

    Thread Starter
    Junior Member PESHuk's Avatar
    Join Date
    Mar 2010
    Posts
    25

    Question New Mail Message (Simple)

    Hey All,

    I am sure there will be a really simple answer to this question, but here goes...

    How do you call a new mail message from outlook to be pre populated with email address to send to and a body and subject?

    Thanks in advance.
    Hey! It compiles! Ship it!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: New Mail Message (Simple)

    If you specifically want to use Outlook then you would have to use Office Automation, which is not simple. If you want to just use the user's default mail client then it is simple. You just construct the appropriate mailto URL and call Process.Start, e.g.
    vb.net Code:
    1. Dim url = "mailto:someone@somewhere.com"
    2.  
    3. Process.Start(url)
    That is equivalent to clicking on a mailto link in a web page. You can simply construct the URL to contain the parts you want. It's very easy to find information on how to do that on the web.

    EDIT: E.g. this was the first result when I searched for "mailto url":

    http://email.about.com/od/mailtoemai...o_elements.htm

  3. #3

    Thread Starter
    Junior Member PESHuk's Avatar
    Join Date
    Mar 2010
    Posts
    25

    Re: New Mail Message (Simple)

    Thats what I wanted to do, thats brilliant thanks for your help!
    Hey! It compiles! Ship it!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width