Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB5 Class to send email and not need Outlook

Posted on 1998-12-18
10
Medium Priority
?
221 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
[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
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 1

Accepted Solution

by:
CarlosJac earned 200 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

715 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