Re: how to send email to extranet

Tech-Archive recommends: Fix windows errors by optimizing your registry




"£¤£¤£¤" <eagle@xxxxxxxxxxx> wrote in message
news:usDQAlkjIHA.484@xxxxxxxxxxxxxxxxxxxxxxx
It works well to send email to intranet email-box.
If I try to send email to a extranet email-box,the script will issue the
following information when it executes the last line " objEmail.send "

------ information---------
(null): The server rejected one or more recipient addresses. The server
response was: 554 Relay rejected for policy reasons.


####################VBS code#############
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "name@xxxxxxxxxx"
objEmail.To = "extranet@xxxxxxxxxx"

objEmail.Subject = "Server down"
objEmail.Textbody = "No longer accessible over the network."
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing";) = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver";) = _
"192.168.0.1" 'this is mail server IP.
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport";) = 25
objEmail.Configuration.Fields.Update
objEmail.Send


You've got most of the required stuff in your code but you need
to replace the SMTP server's IP address with name of your ISP's
SMTP server. Here is a modified version of your code. I have
tightened it up a little to make it more readable.

schema = "http://schemas.microsoft.com/cdo/configuration/";

Set objEmail = CreateObject("CDO.Message")
With objEmail
.From = "name@xxxxxxxxxx"
.To = "extranet@xxxxxxxxxx"
.Subject = "Server down"
.Textbody = "No longer accessible over the network."
' .AddAttachment "d:\Testfile.txt"
With .Configuration.Fields
.Item (schema & "sendusing") = 2
.Item (schema & "smtpserver") = "mail.SomeISP.com"
.Item (schema & "smtpserverport") = 25
.Item (schema & "smtpauthenticate") = cdoBasic
.Item (schema & "sendusername") = "name@xxxxxxxxxx"
.Item (schema & "sendpassword") = "SomePassword"
End With
.Configuration.Fields.Update
.Send
End With


.



Relevant Pages

  • Re: Help me understand something........
    ... Does the smtp server on th infected ... >In my network, I know I've had the mytob virus.. ... The "Received:" header, ...
    (microsoft.public.exchange.admin)
  • Re: Cant send email from Exchange account at home
    ... > setup and it works fine when I am using it on my institution's network. ... It might be a limitation the Net admin enforced on your server. ... What I did to workaround this is that I created a POP account witht he ... > specified my credentials for the SMTP server, ...
    (microsoft.public.mac.office.entourage)
  • Re: cant send some mail through the firewall
    ... > IP addresses as well as our private network. ... the SMTP server in the private network? ... entries that points to the private IP of the SMTP server. ...
    (comp.security.firewalls)
  • Re: 554 : Recipient address rejected: Relay acces
    ... What I expect is that telus will only, by default, let people use their SMTP server to relay email when they are connecting via the telus network on a telus IP address ...
    (microsoft.public.exchange.admin)
  • RE: SMTP timeout
    ... what changed in your network ... Once you download this utility to the ISA server rename it and run it and then execute the resulting isainfo.vbs file. ... I use a normal external SMTP server of my ISP: if the mail I send is small ...
    (microsoft.public.isaserver)