• Answers
  • Web
Personalize Yedda, (And make Danny Happy)
People ask & answer about almost everything. Tell us what you're interested in... So we can personalize Yedda especially for you
I'm interested in:

PcMasTeR

How i can send an email via vb6?i searched for it ...

How i can send an email via vb6?i searched for it very much.but i didn't understand anything.I want a simple source code that sends email and yahoo is supported.Than you.


Share Send to a friend Watch Report
 
 

2 Posted Answers
Order by

 
5 helpful answers
I have a great idea -Changing the world ..., what to do? See Tim Berners-Lee's (founder of www) FAQ section.

VBA 

Outlook users:

 Public Sub SendMail(iv_user_id_hr As String)
  Dim appOutlook As New Outlook.Application
  Dim objMailtemplate As Outlook.MailItem
  Dim objMail As Outlook.MailItem
 
  Set objMailtemplate = GetCurrentOutlookMail()
  Set objMail = appOutlook.CreateItem(olMailItem)
  With objMail
    .To = iv_user_id_hr
    .Recipients.ResolveAll
    .CC = ""
    .BCC = ""
    .Subject = objMailtemplate.Subject
    .Body = objMailtemplate.Body
    .BodyFormat = objMailtemplate.BodyFormat
    .HTMLBody = objMailtemplate.HTMLBody
    .Importance = objMailtemplate.Importance
    .ReminderSet = objMailtemplate.ReminderSet
    .ReminderTime = objMailtemplate.ReminderTime
    .VotingOptions = objMailtemplate.VotingOptions
    .VotingResponse = objMailtemplate.VotingResponse
  If frm_mailing_wizard.chk_do_not_send = False Then
    .Send
  Else
    .Display
  End If
  End With
End Sub

------------

via URL:

Public 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

Public Sub OpenURL(url As String, Optional ByVal ShowMode As OpenUrlShowConstants = swNormal)
  ShellExecute GetDesktopWindow(), "Open", url, "", "", ShowMode
End Sub

...

  If lv_url <> "" Then
    OpenURL (lv_url)
  End If
...

 

for lv_url use this syntax:

lv_url = 'mailto:' && lv_address_to && '&subject=' && iv_subject && '&body=' && lv_body

Posted 2007-12-17T21:36:58Z
MikeBeer was invited by Yedda to answer this question.

Helpful?(2)
Rated as Best Answer
 
2 helpful answers

PcMasTeR

i cant understand it.i want to send mail via url.if u can please give me the source code of it.thank u.

Posted 2007-12-22T09:38:30Z

Sign in to participate

Got an answer for SaLiXeM? Would you like to comment on the posted answers, or vote for the one which you think is the best?

Sign up for a free account, or sign in (if you're already a member).

Feed - Subscribe to changes to this Q&A Blog
ADVERTISEMENT
  • Answers
  • Web
Copyright © 2006-2009, Yedda Inc. and respective copyright owners · CC License