ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sendmail message (https://www.excelbanter.com/excel-programming/304732-sendmail-message.html)

marta

sendmail message
 
Hello,
Using a macro, I am trying to send a worksheet using the
SendMail action. I get the following message:

"A program is trying to automatically send e-mail on your
behalf. Do you want to allow this?
If this is unexpected, it may be a virus and you should
choose "No"."

This is the code I am using:
ActiveWorkbook.SendMail Recipients:=Array
("recipient1", "recipient2")

Is there any way to avoid this message?

Thank you!
Marta

Tom Ogilvy

sendmail message
 
Ron de Bruin has code that uses CDO to send the mail and avoid the prompt.

Ron de Bruin's site

http://www.rondebruin.nl/sendmail.htm

--
Regards,
Tom Ogilvy

"marta" wrote in message
...
Hello,
Using a macro, I am trying to send a worksheet using the
SendMail action. I get the following message:

"A program is trying to automatically send e-mail on your
behalf. Do you want to allow this?
If this is unexpected, it may be a virus and you should
choose "No"."

This is the code I am using:
ActiveWorkbook.SendMail Recipients:=Array
("recipient1", "recipient2")

Is there any way to avoid this message?

Thank you!
Marta




hs234

sendmail message
 
Doesn't CDO require some applications (IIS, Exchange, etc.) to be
installed first? I don't think it's a part of operating system.

I would use a 3rd party library. My "weapon of choice" is SMTP
Component http://www.ostrosoft.com/smtp_component.asp

Or just search Google for +SMTP +Excel +VBA

hs234


On Thu, 22 Jul 2004 12:24:47 -0400, "Tom Ogilvy"
wrote:

Ron de Bruin has code that uses CDO to send the mail and avoid the prompt.

Ron de Bruin's site

http://www.rondebruin.nl/sendmail.htm



Ron de Bruin

sendmail message
 
If you run Win 2000 or win XP you can use CDO(for Win 2000)
Read the info on the webpage
http://www.rondebruin.nl/cdo.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"hs234" wrote in message ...
Doesn't CDO require some applications (IIS, Exchange, etc.) to be
installed first? I don't think it's a part of operating system.

I would use a 3rd party library. My "weapon of choice" is SMTP
Component http://www.ostrosoft.com/smtp_component.asp

Or just search Google for +SMTP +Excel +VBA

hs234


On Thu, 22 Jul 2004 12:24:47 -0400, "Tom Ogilvy"
wrote:

Ron de Bruin has code that uses CDO to send the mail and avoid the prompt.

Ron de Bruin's site

http://www.rondebruin.nl/sendmail.htm






All times are GMT +1. The time now is 03:35 PM.

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