Solved

VB5 Class to send email and not need Outlook

Posted on 1998-12-18
10
215 Views
Last Modified: 2010-05-03
Can the person who said they would send me a VB5 class please send it to me?
The class is to allow VB5 to send email without requiring Outlook to be on the PC.
Thanks
DoughBoy
0
Comment
Question by:DoughBoy
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 1

Accepted Solution

by:
CarlosJac earned 50 total points
ID: 1451368
DoughBoy:

 I 've just sent you the class
0
 
LVL 15

Expert Comment

by:ameba
ID: 1451369
Can the other experts see this?
0
 
LVL 1

Expert Comment

by:MAVERICK
ID: 1451370
sure can!

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!

 

Author Comment

by:DoughBoy
ID: 1451371
CarlsJac,

   I know it's been a month,  but I finally got around to testing your EmailHandler Class and still have the mail sent to outlook instead of to the email address.  

   What am I doing wrong?

Thanks
DoughBoy
0
 
LVL 1

Expert Comment

by:CarlosJac
ID: 1451372
DoughBoy:

Show me your code, please

thank you
0
 

Author Comment

by:DoughBoy
ID: 1451373
I am using your class,  so you should be familiar with what are in the actual function calls.  Also,  of course, I am using a false ID and Password since we are on the internet right now.
   
    Dim retval As Integer
    Dim myEmail As EmailHandler
   
    Set myEmail = New EmailHandler
   
    retval = myEmail.OpenSession("TempUserID", "MyPword", True, True, True)
    retval = myEmail.SendMail(Trim$(txtSubject.Text), Trim$(txtMessage.Text), Trim$(txtSendTo.Text), "", "", True)
    retval = myEmail.CloseSession
 
I am just trying to get the basics done before I make the code more complicated.  One thing I noticed is that I received an error message saying my profile name was not correct.  When I ran the function GetDefaultProfile,  it brought up "Microsoft Outlook." After pressing OK,  it then opened Outlook express and copied the email message to a file in the CreateMessage Section of Outlook.

Your help is appreciated.
Thanks

0
 
LVL 15

Expert Comment

by:ameba
ID: 1451374
0
 
LVL 1

Expert Comment

by:CarlosJac
ID: 1451375
Try:

    Dim retval As Integer
    Dim myEmail As EmailHandler
     
    Set myEmail = New EmailHandler
     
    retval = myEmail.OpenSession("TempUserID", "MyPword", True, False, False)
    retval = myEmail.SendMail(Trim$(txtSubject.Text), Trim$(txtMessage.Text), Trim$(txtSendTo.Text), "", "", True)
    retval = myEmail.CloseSession

Note this:  in OpenSession call, the arguments 4 and 5 are False.
If the argument 4, force to do a new session.  If it is True, use an existent session (eg: Outlook Session).  Perhaps, this change resolve your problem.
Say me the results ...
Good luck, and excuse me (my english is very poor)

0
 

Author Comment

by:DoughBoy
ID: 1451376
Hello CarlosJac,

  Well,  there are now no error messages.  Unfortunately,  it still brings up the MS Outlook program.  And do not worry,  you english is fine.

Thanks
DoughBoy

0
 
LVL 4

Expert Comment

by:wileecoy
ID: 1451377
Was this resolved?

I am interested in the answer, but it looks like the answer was never posted.

I've already paid points for the answer, I guess just a yes/no would do, and if it's no (that the answer is not posted), can he who holds that answer send it to me??

norman_floria@rsmi.com

Thanks
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

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

685 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