a Microsoft Outlook question... I attacted vb code already...
If I did'nt setting anything in Microsoft Outlook, the code below can successful send out email?? or can mannual set at coding the smtp server or email address...
Code:
Private Sub CmdSend_Click()
Dim objOut As Outlook.Application
Dim objMsg As Outlook.MailItem
Set objOut = CreateObject("Outlook.Application")
Set objMsg = objOut.CreateItem(olMailItem)
With objMsg
.Importance = olImportanceHigh
.ReadReceiptRequested = True
.Recipients.ResolveAll
.To = txtto.Text
.Subject = txtsubject.Text
.Body = txtbody.Text
.ReadReceiptRequested = True
.BodyFormat = olFormatHTML
If txtAttach1.Text <> "" Then
.Attachments.Add txtAttach1.Text, olByValue
End If
.Send
End With
Set objMsg = Nothing
Set objOut = Nothing
End If
Re: a Microsoft Outlook question... I attacted vb code already...
Yes, it will but you will get the Outlook Security Prompt on Outlook 2000 - 2003.
http://vbforums.com/showthread.php?t=402086
Re: a Microsoft Outlook question... I attacted vb code already...
The link shown I not very understand how to use...
how to setup email account,smtp server etc at my coding...
Re: a Microsoft Outlook question... I attacted vb code already...
If I do not want to use microsoft outlook default email account to send email, how to use other email address to send email from vb code...?
Re: a Microsoft Outlook question... I attacted vb code already...
If you want SMTP instead then do a forums search for SMTP and you will get may code examples. You will need access to a ser er running SMTP services.