Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact
A1VBCode Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      

Home » Visual Basic (VB 4/5/6) » Game Programming » How to send email


How to send emailExpand / Collapse
Author
Message
Posted 5/28/2008 3:14:30 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/28/2008 3:14:30 AM
Posts: 1, Visits: 11
I want to how to send an email to a known address using vb

TheProgrammer -- A modest one
Post #25031
Posted 5/28/2008 7:15:33 AM


Forum God

Forum GodForum GodForum GodForum GodForum GodForum GodForum GodForum God

Group: Forum Members
Last Login: Yesterday @ 7:34:31 PM
Posts: 1,465, Visits: 3,404
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.

Keith

http://www.martin2k.co.uk/forums/

I've been programming with VB for 12 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
Post #25033
Posted 8/7/2008 8:07:48 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/8/2008 12:35:08 AM
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

Post #25535
Posted 8/7/2008 5:00:17 PM


Forum God

Forum GodForum GodForum GodForum GodForum GodForum GodForum GodForum God

Group: Forum Members
Last Login: Yesterday @ 7:34:31 PM
Posts: 1,465, Visits: 3,404
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.

Keith

http://www.martin2k.co.uk/forums/

I've been programming with VB for 12 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
Post #25547
Posted 8/16/2008 10:02:11 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/16/2008 10:12:35 AM
Posts: 5, Visits: 2
jackpot! This is what exactly i'm looking for. Thanks for the post.

hp printer toner Ford Car Leasing
Post #25570
Posted 8/16/2008 10:04:22 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/16/2008 10:12:35 AM
Posts: 5, Visits: 2
jackpot! This is what exactly i'm looking for. Thanks for the post.

hp printer toner Ford Car Leasing
Post #25571
Posted 8/16/2008 6:01:51 PM


Forum God

Forum GodForum GodForum GodForum GodForum GodForum GodForum GodForum God

Group: Forum Members
Last Login: Yesterday @ 7:34:31 PM
Posts: 1,465, Visits: 3,404
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.

Keith

http://www.martin2k.co.uk/forums/

I've been programming with VB for 12 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
Post #25575
Posted 9/9/2008 2:58:50 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/9/2008 2:59:42 AM
Posts: 5, Visits: 4
this function can use send email in php
mail(to,subject,message,headers,parameters)


___________________________________________________________
web site designer
[url=http://freetemplates.webdesigningcompany.net/]free web templates
[/url]
Post #25665
Posted 9/9/2008 7:05:34 AM


Forum God

Forum GodForum GodForum GodForum GodForum GodForum GodForum GodForum God

Group: Forum Members
Last Login: Yesterday @ 7:34:31 PM
Posts: 1,465, Visits: 3,404
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.

Keith

http://www.martin2k.co.uk/forums/

I've been programming with VB for 12 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
Post #25668
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Brian, Peter

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 5:25am