(Reproduced) Send Email without Installing The SMTP Service

zhaozj2021-02-16  106

Send Email without Installing The SMTP Service

description

Demonstration Script That Uses CDO To Send Email from a Computer Where The SMTP Service Has Not Been Installed. Designed to Work On Microsoft's Corporate Network.

Script code

Set Objemail = CreateObject ("cdo.message")

Objemail.From = "admin1@fabrikam.com"

Objemail.to = "admin2@fabrikam.com"

Objemail.subject = "Server Down"

Objemail.TextBody = "Server1 is no longer accessible over the network."

Objemail.configuration.fields.Item_

("http://schemas.microsoft.com/cdpo/configuration/sendusing") = 2

Objemail.configuration.fields.Item_

("http://schemas.microsoft.com/cdpo/configuration/smtpserver") = _

"smarthost"

Objemail.configuration.fields.Item_

("http://schemas.microsoft.com/cdpo/configuration/smtpserverport") = 25

Objemail.configuration.fields.Update

Objemail.send

For online peer support, join the microsoft.public.windows.server.scripting community on the msnews.microsoft.com news server. To provide feedback or report bugs in sample scripts or the Scripting Guide, please contact Microsoft TechNet.

Free declaration

The above sample scripts will not receive support provided by any Microsoft standard support plan or service project. These sample scripts are not included in any form of guaranteed commitments when committed. Not only that, Microsoft does not add a limited condition to further denial of all the acquiescence guarantees for all the default guarantees, which includes a default guarantee responsibility for the preferred or applicability for a particular purpose. All risks caused by the use or execution of the above example scripts and documentation are borne by the reader. In any case, Microsoft and its creators, or any personnel related to the creative, preparation and submission of the above scripts, are not required for any damage caused by the use or cannot use the above example script or document data (including, " Enterprise profits, operational interruption, business information loss and other economic losses) are responsible; even if Microsoft has been told to cause this damage, the above disclaimer is still applicable.

转载请注明原文地址:https://www.9cbs.com/read-8121.html

New Post(0)