Solved

Email from VB

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

752 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