|
-
Feb 5th, 2003, 09:50 PM
#1
Thread Starter
Hyperactive Member
How can I make program able to send email?
If I want to make my program able to send simple email in html format, What way I can do it? (step by step or some Example Code)
-
Feb 7th, 2003, 08:39 AM
#2
Sleep mode
Re: How can I make program able to send email?
Originally posted by solar115
If I want to make my program able to send simple email in html format, What way I can do it? (step by step or some Example Code)
this would get you started .
VB Code:
' Create DevMailer Object
Set Mailer = CreateObject("Geocel.Mailer")
' Add first SMTP server
Mailer.AddServer "mail",25
' Set Sender Information
Mailer.FromName = "First Last"
' Add a recipient to the message
' Set the Subject and Body
Mailer.Subject = "Welcome to DevMailer"
Mailer.Body = "Test Message Body Line 1" & VbCrLf & _
"Test Message Body Line 2" & VbCrLf
' Send Email - Perform Error Checking
bSuccess = Mailer.Send()
If bSuccess = False Then
If Mailer.Queued = False Then
MsgBox( "Could not send message..queueing failed!" )
Else
MsgBox( "Could not send message..queued instead!" )
End If
Else
MsgBox( "Message Sent Successfully!" )
End If
-
Feb 7th, 2003, 08:41 AM
#3
Sleep mode
another simple way
VB Code:
'Declarations
Private 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
Private Const SW_SHOW = 5
'in a form
ShellExecute hwnd, "open", "mailto: [email protected]", vbNullString, vbNullString, SW_SHOW
-
Feb 7th, 2003, 04:34 PM
#4
Frenzied Member
Hello pirate,
What will your two codes use, default mail client, outlook or what ?? Can you give some explanation ??
-
Feb 8th, 2003, 11:06 AM
#5
Fanatic Member
Originally posted by usamaalam
Hello pirate,
What will your two codes use, default mail client, outlook or what ?? Can you give some explanation ??
That will just show the default email program that the user is using.
It wont actually send a email, it will just popup a compose new message dialog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|