Solved

VB5 Class to send email and not need Outlook

Posted on 1998-12-18
10
208 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now