ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto email (https://www.excelbanter.com/excel-programming/309148-auto-email.html)

WW

Auto email
 
Hello

In this age of spam, is it possible to send an email automatically from
excel without 1) user response 2) using Outlook Express' lower security
standards? Can DOS accommodate a "mail" command (as would BASH)?

Thanks

W

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

sulprobil

Auto email
 
'Orig: Marcus Schmitt, copied and adapted from http://bert-
koern.de/excel/excel_makros_e.htm:

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 Sub Mail(eMail As String, Optional Subject As
String, _
Optional Body As String)
Call ShellExecute(0&, "Open", "mailto:" + eMail + _
"?Subject=" + Subject + "&Body=" + Body, "", "", 1)
End Sub
Private Sub Command1_Click()
Dim Nachricht As String
' Force Newline with %0D%0A !
Message = "Hello" & "%0D%0A" & "World!"
Call ", "My
Subject", Message)
End Sub


WW

Auto email
 
Cool! Thanks! I will give it a try...

W

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 04:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com