1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Send email by outlook

Discussion in 'Development' started by chanh_trung, Jun 29, 2004.

  1. chanh_trung

    chanh_trung New Member

    Seems to be ok with codes like this:

    DEFINE VARIABLE objOutlook AS COM-HANDLE NO-UNDO.
    DEFINE VARIABLE objOutlookMsg AS COM-HANDLE NO-UNDO.
    DEFINE VARIABLE objOutlookAttach AS COM-HANDLE NO-UNDO.
    DEFINE VARIABLE objOutlookRecip AS COM-HANDLE NO-UNDO.
    CREATE "Outlook.Application" objOutlook.
    objoutlookMsg = objOutlook:CreateItem(0).
    objOutlookRecip = objOutlookMsg:Recipients:Add(vTo).
    objOutlookRecip:Type = 1.
    objOutlookMsg:Subject = vSubject.
    objOutlookMsg:Body = vBody.
    objOutlookMsg:Attachments:Add(vFile).
    objOutlookRecip:Resolve.
    objOutlookMsg:Send.
    objoutlook:Quit().
    RELEASE OBJECT objOutlook.
    RELEASE OBJECT objOutlookMsg.
    RELEASE OBJECT objOutlookRecip.

    But then, there are 2 problems that I need your advice:

    1. MS Outlook will ask for permission to send email. How can I avoid this? (since gonna send hundred mails)

    2. the attachement will be given 'dat' as extension name. Why? And how can we avoid this?

    Thanks so much.
     
  2.  
  3. smithxxl

    smithxxl New Member

    There is no way that I know of to prevent the confirmation message from coming up. I attempted to create an automated way of sending e-mail messages, but ended up creating a VB program that did all the nasty work of SMTP server and calling it from my PROGRESS application.
     

Share This Page