Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with vbsendmail.dll

Status
Not open for further replies.

vbSun

Programmer
Dec 9, 2002
504
0
0
US
Hi,

I am trying to use the famous vbsendmail.dll to start mailing from my VB app. Am not sure what SMTP server should i give. Can any one help? Is there any that i can rely on to relay the mails? One more thing.. i may not be able to edit the code, once i deliver it.

Thanks for the help..
Sunil
 
Here is the code I use to send email through a couple of apps using outlook, that way whatever the system is set up to is how the mail is sent.

Public Sub SendNewMail(ByVal EMailAddress As String, ByVal SubjectText As String, ByVal BodyText As String)
Dim objOutlook As Object
Dim objOutlookMsg As Object

Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(0)

With objOutlookMsg
.To = EMailAddress
.Subject = SubjectText
.Body = BodyText
.Send
End With

Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub


Hope it helps
 
Hi DaemonSaDiablo,

Thanks for the helping hand. I am also used to the MS Outlook and its Automation, but this time, the scenario is a bit different. We need to use the package in almost every Win system, so systems without outlook will give us automation error. I found the vbsendmail.dll in another VB source code site, and i think that will be of use in this project. As i know, its already used widely, and thought some of us are better informed about it than i am. If you are still automating the Outlook, pls check that site, i think you will also find it useful at some point.

Thanks again..
 
I would consider using the MapiMessage and MapiSession controls. They give good control of mail sending with any standard Mapi client (Outlook, OE, Exchange etc) so you dont have to worry about SMTP settings or which Mapi client they use

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Thanks John, Can you point me towards some resource john?
 
There is a FAQ on MAPI and Outlook at faq222-179.

> Here is the code I use to send email through a couple of apps using outlook, that way whatever the system is set up to is how the mail is sent.

You may also find it useful to have a look at the MAPI stuff. Imagine if someone uses your program and thier system isn't using outlook...

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
A quick search on this forum brought up thread222-616754. I gave a sample in the last post in that thread.

There is also some stuff in VBHelp, under Mapi controls, MapiMessage Control and MapiSession Control

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Thanks all, am wrestling with the code already...

Will get back as soon as i am successful...

Cheers,
Sunil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top