Solved

Email from VB

Posted on 2000-05-11
3
162 Views
Last Modified: 2010-05-02
Hi,

Anybody has code for sending an email from vb?

Desperate, please!!!

Regards,
Rajesh in Christ.
0
Comment
Question by:rgodavarthi
3 Comments
 
LVL 1

Accepted Solution

by:
sdbanks earned 50 total points
ID: 2801804
I did a search earlier for the same thing.  Here is the answer I liked best.



http://www.experts-exchange.com/bin/BuyPAQ?qid=10176294
0
 
LVL 2

Expert Comment

by:Crin
ID: 2802564
Wow sdbanks, not a good habbit to post the answer to the question... Especially if this answer will decrease points of one who asked...

rgodavarthi

Be careful, clicking provided link will decrease your points.

Provided example in fact use SMTP directly and is right, of course.

Now one another way - the way if you want to use installed mailer to initiate e-mail:

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
    (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
    ByVal lpParameters As String, ByVal lpDirectory As String, _
    ByVal nShowCmd As Long) As Long

then use

ShellExecute 0, "open", "mailto:crin@mail.com", "", "", 1

or any e-mail address you like (or variable) instead the "mailto:crin@mail.com" :))

Sincerely yours,

Crin
0
 

Expert Comment

by:buem
ID: 2808006
If you want to send mail through mail box in your computer , You must be use MAPI of microsoft in Windows system which you can see example in your sample directory of VB in your computer.
buem,
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

775 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