By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,639 Members | 1,326 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,639 IT Pros & Developers. It's quick & easy.

SMTP - need help understanding

P: n/a
Hi,

I'm successfully sending email using the following code snip but what I
don't understand is the use of "Http://schema" references. What
happens to all email programs that use these references if this site
were to ever go down? Is there a way to hard code the content behind
these addresses? The program I am writing will live as a Windows
Service on a server. Can I be 100% that this server will have access
to this schema address? Just seems weird to me.

Thanks if anybody can better explain.
With objMailMessage

..Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver",
strSMTPAddress)

..Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport",
25)

..Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing",
cdoSendUsingPort)

..Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",
cdoBasic)

..Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername",
strSendUserName)

..Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword",
strSendUserPassword)
.From = strFromAddress
.To = strToAddress
.Bcc = strBccAddress
.Cc = strCcAddress
.Subject = strSubject
.Body = strBody
End With

Mar 24 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a

"ZRexRider" <je****@ptd.net> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
I'm successfully sending email using the following code snip but what I
don't understand is the use of "Http://schema" references. What
happens to all email programs that use these references if this site
were to ever go down? Is there a way to hard code the content behind
these addresses? The program I am writing will live as a Windows
Service on a server. Can I be 100% that this server will have access
to this schema address? Just seems weird to me.


Looks weird to me. This is J# but it works OK and should be almost the same
in VB

================================================
import System.Net.Mail.*;

private void btnSend_Click(Object sender, System.EventArgs e)
{
MailAddress myTo = new MailAddress(toaddress);
MailAddress myFrom = new MailAddress(fromaddress);
MailMessage myMessage = new MailMessage(myFrom, myTo);
myMessage.set_Body("This is the body");
myMessage.set_Subject("This is the subject");
SmtpClient myClient = new SmtpClient("smtp.server.net");
myClient.Send(myMessage);
}
================================================
toaddress and fromaddress should be email addresses in quotes
Mar 26 '06 #2

P: n/a
ZRexRider,

The http://schemas.microsoft.com references are namespaces (I think).
It doesn't actually go out to Microsoft's servers and get any
information. It is just a property.

They could have just as easily made the CDO object work the following
way (I'm not sure why they didn't, but there must be a good reason):
objMailMessage.sendUsing(smtpPort, 25)
objMailMessage.send

They must have developed the properties the way they did for
extensability or to conform to some standard.

But in the end, it doesn't use their servers. It is just a constant /
namespace.

Mar 26 '06 #3

P: n/a

Seth wrote:
ZRexRider,

The http://schemas.microsoft.com references are namespaces (I think).
It doesn't actually go out to Microsoft's servers and get any
information. It is just a property.

They could have just as easily made the CDO object work the following
way (I'm not sure why they didn't, but there must be a good reason):
objMailMessage.sendUsing(smtpPort, 25)
objMailMessage.send

They must have developed the properties the way they did for
extensability or to conform to some standard.

But in the end, it doesn't use their servers. It is just a constant /
namespace.


Thanks - that makes sense I guess. I wouldn't have needed these
settings at all except I was unable to find a property that would let
me set user ID and password since authentication is necessary with the
SMTP server Im using

Thanks again

Mar 26 '06 #4

P: n/a
There are a couple of options I can think of:

1. If using postfix, add the IP address to the mynetworks list and then
set it up to not require authentication for mynetworks.

2. it looks like you can set credentials using CDO. See
http://kb.seekdotnet.com/ViewArticle/152data.aspx.

Hope that helps.

Seth

Mar 26 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.