?
Solved

Outlook message

Posted on 2003-03-18
6
Medium Priority
?
176 Views
Last Modified: 2012-05-04

Hi

I’m writing a program in vb6 that read emails from outlook and send auto response,
Every think is working, except outlook refuses to send messages that created in my program.
(The messages Appear in the outbox, but outlook doesnt send them)

Does any one know how can change outlook security setting to enforce send.
or mabye i have a problem with the send message function :


Public Sub SendOutlookMail(subject As String, Recipient As _
                                String, Message As String)

On Error GoTo ErrorHandler
    Dim tempOutlookAp As Outlook.Application
    Set tempOutlookAp = GetObject(, "Outlook.Application")
   
    Dim oItem As Outlook.MailItem
    Set oItem = tempOutlookAp.CreateItem(olMailItem)
    '
    With oItem
       .subject = subject
       .To = Recipient
       .Body = Message
       .Send
    End With
    '
    Set oItem = Nothing
    Set tempOutlookAp = Nothing
     '
     Exit Sub
ErrorHandler:
    Debug.Print Err.Description
End Sub

Thanks
0
Comment
Question by:nachumiifat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 27

Accepted Solution

by:
Dabas earned 240 total points
ID: 8158763
Try using the MAPI controls instead. That works, and you will still have the item appearing in Sent Items
0
 
LVL 2

Expert Comment

by:DanAvni
ID: 8158765
have a look at http://www.dimastr.com/redemption/faq.htm
at the answer to question #1, they have a sample at the end of the answer that might do the trick for you. note the paragraph above it for some related problems.
0
 

Expert Comment

by:CleanupPing
ID: 8532086
Hi nachumiifat,
This old question (QID 20554637) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:GPrentice00
ID: 8982862
This question has been classified as abandoned.  I will make a recommendation to the moderators on its resolution in a week or two.  I would appreciate any comments by the experts that would help me in making a recommendation.
It is assumed that any participant not responding to this request is no longer interested in its final deposition.

If the asker does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp

GPrentice00
Cleanup Volunteer
0
 
LVL 27

Expert Comment

by:Dabas
ID: 8982883
GPrentice00,
Suggest Points to Dabas.
First acceptable answer

Dabas
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 9033926
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

 -->Accept Dabas's comment as Answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question