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)
Printable View
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 .Quote:
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)
VB Code:
' Create DevMailer Object Set Mailer = CreateObject("Geocel.Mailer") ' Add first SMTP server Mailer.AddServer "mail",25 ' Set Sender Information Mailer.FromAddress = "[email protected]" Mailer.FromName = "First Last" ' Add a recipient to the message Mailer.AddRecipient "[email protected]","You" ' 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
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
Hello pirate,
What will your two codes use, default mail client, outlook or what ?? Can you give some explanation ??
Quote:
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