Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


How to send email


How to send email

Author
Message
TheProgrammer
TheProgrammer
Forum God
Forum God (391 reputation)Forum God (391 reputation)Forum God (391 reputation)Forum God (391 reputation)Forum God (391 reputation)Forum God (391 reputation)Forum God (391 reputation)Forum God (391 reputation)Forum God (391 reputation)

Group: Forum Members
Posts: 1, Visits: 11
I want to how to send an email to a known address using vb

TheProgrammer -- A modest one
Keithuk
Keithuk
Forum God
Forum God (297K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
Welcome to A1vbcode TheProgrammer

TheProgrammer (5/28/2008)
I want to how to send an email to a known address using vb

To send a basic email all you need to use is the ShellExecute API call.

Option Explicit

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

Const SW_SHOW = 5

Private Sub Command1_Click()

ShellExecute Me.hwnd, "open", "mailto:" & "youremail@address" & _
"?subject=" & "Subject Title", vbNullString, vbNullString, SW_SHOW

End Sub

By the way you have posted this in the wrong forum, this is the Game Programming forum, perhaps Admin will move it to General VB. Wink

Keith

I've been programming with VB for 17 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

tejal09
tejal09
Forum God
Forum God (405 reputation)Forum God (405 reputation)Forum God (405 reputation)Forum God (405 reputation)Forum God (405 reputation)Forum God (405 reputation)Forum God (405 reputation)Forum God (405 reputation)Forum God (405 reputation)

Group: Forum Members
Posts: 1, Visits: 2
Hi,

I want to achieve same

Want to send mail from Defalut mail client.

But with that want to format body text also.

Want to add image also.

Any idea ?

How to achieve this ?

Thanks,

SunRays

Keithuk
Keithuk
Forum God
Forum God (297K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
Welcome to A1vbcode tejal.

tejal09 (8/7/2008)
Hi,

I want to achieve same

Want to send mail from Defalut mail client.

But with that want to format body text also.

Want to add image also.

Its very difficult to put in the text body and attachments with ShellExecute.

There are ways with OutLook but you have to reference OutLook. I don't have OutLook installed.

 Have you thought about vbSendMail.dll ? Do a web search for it. Wink

Keith

I've been programming with VB for 17 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

garsky
garsky
Forum God
Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)

Group: Forum Members
Posts: 5, Visits: 2
jackpot! This is what exactly i'm looking for. Thanks for the post.

hp printer toner Ford Car Leasing

garsky
garsky
Forum God
Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)Forum God (2K reputation)

Group: Forum Members
Posts: 5, Visits: 2
jackpot! This is what exactly i'm looking for. Thanks for the post.

hp printer toner Ford Car Leasing

Keithuk
Keithuk
Forum God
Forum God (297K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
Welcome to A1vbcode garsky

garsky (8/16/2008)
jackpot! This is what exactly i'm looking for. Thanks for the post.

You're welcome garsky.

You will have to watch pressing the Post Reply button because I've just seen two double posts. Wink

Keith

I've been programming with VB for 17 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

emily12
emily12
Forum God
Forum God (1.3K reputation)Forum God (1.3K reputation)Forum God (1.3K reputation)Forum God (1.3K reputation)Forum God (1.3K reputation)Forum God (1.3K reputation)Forum God (1.3K reputation)Forum God (1.3K reputation)Forum God (1.3K reputation)

Group: Forum Members
Posts: 5, Visits: 4
this function can use send email in php

mail(to,subject,message,headers,parameters)





___________________________________________________________

web site designer

free web templates



Edited
9/8/2008 by emily12
Keithuk
Keithuk
Forum God
Forum God (297K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
emily12 (9/9/2008)
this function can use send email in php
mail(to,subject,message,headers,parameters)

Maybe so emily but PHP isn't VB. Wink

Keith

I've been programming with VB for 17 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search