Results 1 to 4 of 4

Thread: Sending Mail using Outlook

  1. #1

    Thread Starter
    Hyperactive Member Dorothy's Avatar
    Join Date
    Feb 2001
    Posts
    310

    Question Sending Mail using Outlook

    I need help regarding sending mail thru Outlook.

    On Click of a button I need to open a new outlook message
    with to,subject and body pre-typed.

    I used a code similar to this(used MS Outlook library) and I get errors:

    Outlook.Application oa=new Outlook.Application();
    Outlook.MailItem om= Outlook.MailItem();
    om=oa.CreateItem(om);
    om.To ="sdasaf";
    om.Subject="dfgdg";
    om.Body="dfgdfg";

    Help me out.

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    I think this might help you

    http://www.c-sharpcorner.com/Interne...hOutlookCB.asp

    Good luck
    Dont gain the world and lose your soul

  3. #3

    Thread Starter
    Hyperactive Member Dorothy's Avatar
    Join Date
    Feb 2001
    Posts
    310
    Thanks DevGrp, the link helped. The code has been put up by me in the thread titled: "Outllook and VC# "

  4. #4
    Addicted Member
    Join Date
    Aug 2000
    Posts
    183
    neat - just looking over the code here. I don't have a compiler infront of me, does anyone know if you can change the From address in addition? oMailItem.From = "blah";

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