Auto send emails using Outlook 2003
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Auto send emails using Outlook 2003

  1. #1
    Join Date
    Apr 2005
    Posts
    36

    Question Auto send emails using Outlook 2003

    Hi I am trying to send email using the Outlook 2003 in my VB6 program. I am getting popup message from the outlook and need to click Yes to allow to send the mail.

    I want to automate this process instead of clicking Yes to those messages. Please share your knowledge with me how to answer window messages like this in the VB6 program. Or to change any settings in my Outlook to allow send mails.

    I have attached those messages in a work document. Please take a look.
    Attached Files Attached Files

  2. #2
    Join Date
    Sep 2001
    Location
    Québec, Canada
    Posts
    1,923

    Re: Auto send emails using Outlook 2003

    Usually, in MS Office document, there is a property "DisplayAlerts" you can set to false to bypass those little messages, but I don't know if it can work in this case.

    JeffB
    CodeGuru VB FAQ Visual Basic Frequently Asked Questions
    VB Code color Tool to color your VB code on CodeGuru
    Before you post Importants informations to know before posting

  3. #3
    Join Date
    Aug 2002
    Location
    Dubai
    Posts
    1,183

    Re: Auto send emails using Outlook 2003

    Quote Originally Posted by JeffB
    Usually, in MS Office document, there is a property "DisplayAlerts" you can set to false to bypass those little messages, but I don't know if it can work in this case.
    i think there was another thread here about the same problem.
    and the person said changing the "display alerts" option did
    not stop the messages from popping up.

  4. #4
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,854

    Re: Auto send emails using Outlook 2003

    The solution is to go BACK TO Outlook 2000 (if you insist on using Outlook) - it doesn't have the popups

    Otherwise get rid of the notion that you can use Outlook in any practical manner -Microsoft has lost the plot on how to handle email hijacking

    The good news is that you can ABANDON using Outlook and use SMTP email transmission instead - this does not suffer from popups

    Use vbSendmail which is a brilliant piece of work and is quite simple to implement

    SMTP does not go through your Outlook so you also don't get your sent box cluttered with all the emails you are sending automatically

    If you insist that you need a copy of sent emails then part of your sending procedure will be to send a copy to yourself also

  5. #5
    Join Date
    Apr 2005
    Posts
    36

    Lightbulb Re: Auto send emails using Outlook 2003

    Thanks George1111, Can you explain me how to send through SMTP? Also let me know if I can answer a reply 'Yes' within my program for popup messages. then I can continue my old program to work.

    Appreciate the support of you guys and this is a great place to find solution and share the knowledge.

    Have a great week end!

    Saman

  6. #6
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,854

    Re: Auto send emails using Outlook 2003

    vbSendmail

    http://www.freevbcode.com/ShowCode.Asp?ID=109

    You may find a special program which will press the OK button for you automatically - scour the internet using Google

    Here's someone cashing in on Microsoft's Outlook Security

    http://www.add-in-express.com/outloo...ef2=adx2.osm.1

    SMTP is the way to go

  7. #7
    Join Date
    Apr 2005
    Posts
    36

    Re: Auto send emails using Outlook 2003

    Thanks George1111. Appreciate your help.

  8. #8
    Join Date
    Feb 2007
    Posts
    1

    Thumbs up Re: Auto send emails using Outlook 2003

    hi friends
    try this code ...u will not receive any warning messages
    The code below requires no declaration just add microsoft outlook object
    try this u will......enjoy

    Dim strPath$, OutlookItem, ColAttach
    Const olByValue = 1
    Set OutlookItem = Application.CreateItem(0)
    OutlookItem.To = "youremail@email.com"
    OutlookItem.Subject = "This will work!"
    OutlookItem.Body = "This works great, no warning message from Outlook!"
    Set ColAttach = OutlookItem.Attachments
    strPath = App.Path & "\simple.txt"
    ColAttach.Add strPath, olByValue, 1, "File Attachment"
    OutlookItem.Display
    SendKeys "%{s}", True

  9. #9
    Join Date
    Jan 2007
    Posts
    9

    Question Re: Auto send emails using Outlook 2003

    Thanks for the nice example - how can I send the email automatically without previewing it first? I've tried commenting out "Outlookitem.display" but then the email doesn't send at all

    thanks

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center