Article View: bit.listserv.envbeh-l
Article #20E-mail from within VB
From: Quesnel J.
Date: Sun, 10 Sep 2000 01:05
Date: Sun, 10 Sep 2000 01:05
58 lines
2240 bytes
2240 bytes
E-mail from within VB Hello all, I am looking for a way to send an email from within VB. I have tried using something like: Public Sub RunShellExecute(sTopic As String, sFile As Variant, _ sParams As Variant, sDirectory As Variant, _ nShowCmd As Long) Dim hWndDesk As Long Dim success As Long hWndDesk = GetDesktopWindow() success = ShellExecute(hWndDesk, sTopic, sFile, sParams, sDirectory, nShowCmd) 'End If End Sub Private Sub Command1_Click() Unload Me End Sub Private Sub Form_Load() Dim sTopic As String Dim sFile As String Dim sParams As Variant Dim sDirectory As Variant sTopic = "Open" sFile = "mailto:quesnelj@homemail.com" sParams = 0& sDirectory = 0& Call RunShellExecute(sTopic, sFile, sParams, sDirectory, SW_SHOWNORMAL) End Sub This seams to work well, however it does not allow me to set the subject line, nor the body of the message from within VB. So, I guess I'm looking for a similar solution, that will allow me set all field from within VB, and optionally have the message sent without user intervention. This solution should also work regardless of email program used, outlook or netscape. Sine I really don't visit this news group often, I would appreciate if people could reply to me via email, at quesnelj@homemail.com . Thanks, Jacques
Technical Details
Message-ID:
<z7Bu5.1332$gi1.31401@news.magma.ca>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.direct.ca!look.ca!news1.tor.metronet.ca!nntp.magma.ca!news.magma.ca!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1112ac,cbefb166fc4f4ae2,start X-Google-Attributes: gid1112ac,public X-Google-ArrivalTime: 2000-09-09 18:05:46 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.direct.ca!look.ca!news1.tor.metronet.ca!nntp.magma.ca!news.magma.ca!not-for-mail From: "Quesnel J." <quesnelj@homemail.com> Newsgroups: bit.listserv.envbeh-l Subject: E-mail from within VB Lines: 61 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: <z7Bu5.1332$gi1.31401@news.magma.ca> Date: Sun, 10 Sep 2000 01:05:35 GMT NNTP-Posting-Host: 206.191.5.155 X-Trace: news.magma.ca 968547935 206.191.5.155 (Sat, 09 Sep 2000 21:05:35 EDT) NNTP-Posting-Date: Sat, 09 Sep 2000 21:05:35 EDT Organization: Magma Communications Ltd.