Need help with sending message
I've read some about sending an email from and Excel program using VBA and getting around the security prompt - "a program is trying to send ...".
I'm trying to automate an SFTP download using an Excel program. The process works fine when the user starts the Excel program manually. What I would like to do is have the Excel program started automatically as a Windows scheduled task and, when it is finished downloading and processing the data, have it send an email to several users. Using CDO requires a 'From' email address which doesn't exist because it's an application (Excel) that sending.
Is there another way that an email message can be sent?
Thanks.
Re: Need help with sending message
Quote:
Using CDO requires a 'From' email address which doesn't exist because it's an application (Excel) that sending.
supply a valid from address within the code
if you are using users default smtp settings their default from address, will also be used
their are other ways an email can be sent including automating outlook or downloading vbsendmail
all methods have good and bad points
Re: Need help with sending message
Thanks. Isn't there a way to send a message from an application (Excel) to a particular user?
Re: Need help with sending message
you can try like, but i have never used
thisworkbook.sendmail "[email protected]", "Subject", false
Re: Need help with sending message
That gives the "A program is trying to send" security warning that must be answered. Won't work.
Thanks.
Re: Need help with sending message
use cdo then, it totally works in background, you can either use the default smtp settings or custom settings for one time, there are many examples in this and the vb6 forums