Solved

Email from VB

Posted on 2000-05-11
3
160 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

728 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

11 Experts available now in Live!

Get 1:1 Help Now