Solved

VB5 Class to send email and not need Outlook

Posted on 1998-12-18
10
206 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

757 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

21 Experts available now in Live!

Get 1:1 Help Now