Solved

Email from VB

Posted on 2000-05-11
3
164 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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…
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…
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…

820 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