|
 |
aspx thread: Problems sending EMail with ASP.Net
Message #1 by "Hugh McLaughlin" <hugh@k...> on Thu, 7 Feb 2002 11:54:27
|
|
Helloe everyone and thanks for your help in advance. I had developed some
code in Beta 2 to send emails with ASP.Net, but now it doesn't work with
version 1
Here is the code:
Dim Mail As SmtpMail()
Dim MailMsg As New MailMessage()
MailMsg.To = "hugh@k..."
MailMsg.From = "hugh@k..."
MailMsg.BodyFormat = MailFormat.Html
MailMsg.Priority = MailPriority.High
MailMsg.Subject = "Test Message"
MailMsg.Body = "Test Message"
Dim FileName As String = "D:\Test.txt"
MailMsg.Attachments.Add(New MailAttachment(FileName))
Mail.Send(MailMsg)
Mail = Nothing
MailMsg = Nothing
I get the following error:
Compiler Error Message: BC30456: 'Send' is not a member of 'System.Array'.
I have looked at the documentation, but can't seem to figure things out.
Any help would be greatly appreciated.
Thanks.
Message #2 by Sridhar Raj G <Sridharr@i...> on Thu, 7 Feb 2002 17:22:07 +0530
|
|
Hi.,
Mail.Send(MailMsg)
This will not work you have exclusive call the SmtpMail obj
Try doing
SmtpMail.Send(MailMsg)
SmtpMail.SmtpServer = "machine"
SmtpMail.Send(message)
and even call the server name then only it will in .NET
Regards
Sridhar G
-----Original Message-----
From: Hugh McLaughlin [mailto:hugh@k...]
Sent: Thursday, February 07, 2002 5:24 PM
To: ASP+
Subject: [aspx] Problems sending EMail with ASP.Net
Helloe everyone and thanks for your help in advance. I had developed some
code in Beta 2 to send emails with ASP.Net, but now it doesn't work with
version 1
Here is the code:
Dim Mail As SmtpMail()
Dim MailMsg As New MailMessage()
MailMsg.To = "hugh@k..."
MailMsg.From = "hugh@k..."
MailMsg.BodyFormat = MailFormat.Html
MailMsg.Priority = MailPriority.High
MailMsg.Subject = "Test Message"
MailMsg.Body = "Test Message"
Dim FileName As String = "D:\Test.txt"
MailMsg.Attachments.Add(New MailAttachment(FileName))
Mail.Send(MailMsg)
Mail = Nothing
MailMsg = Nothing
I get the following error:
Compiler Error Message: BC30456: 'Send' is not a member of 'System.Array'.
I have looked at the documentation, but can't seem to figure things out.
Any help would be greatly appreciated.
Thanks.
Message #3 by "Hugh McLaughlin" <hugh@k...> on Thu, 7 Feb 2002 12:36:01
|
|
Thanks for your help. Ufortunately, I made the changes and received this:
The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for hugh@k...
I have verified that the SMTP services are running as I can send email via
ASP and CDONTS from the same machine.
> Hi.,
>
> Mail.Send(MailMsg)
> This will not work you have exclusive call the SmtpMail obj
> Try doing
> SmtpMail.Send(MailMsg)
>
> SmtpMail.SmtpServer = "machine"
> SmtpMail.Send(message)
>
> and even call the server name then only it will in .NET
>
> Regards
> Sridhar G
>
> -----Original Message-----
> From: Hugh McLaughlin [mailto:hugh@k...]
> Sent: Thursday, February 07, 2002 5:24 PM
> To: ASP+
> Subject: [aspx] Problems sending EMail with ASP.Net
>
>
> Helloe everyone and thanks for your help in advance. I had developed
some
> code in Beta 2 to send emails with ASP.Net, but now it doesn't work with
> version 1
>
> Here is the code:
> Dim Mail As SmtpMail()
> Dim MailMsg As New MailMessage()
> MailMsg.To = "hugh@k..."
> MailMsg.From = "hugh@k..."
> MailMsg.BodyFormat = MailFormat.Html
> MailMsg.Priority = MailPriority.High
> MailMsg.Subject = "Test Message"
> MailMsg.Body = "Test Message"
> Dim FileName As String = "D:\Test.txt"
> MailMsg.Attachments.Add(New MailAttachment(FileName))
>
> Mail.Send(MailMsg)
>
> Mail = Nothing
> MailMsg = Nothing
>
> I get the following error:
>
> Compiler Error Message: BC30456: 'Send' is not a member
of 'System.Array'.
>
> I have looked at the documentation, but can't seem to figure things out.
>
> Any help would be greatly appreciated.
>
> Thanks.
>
Message #4 by Sridhar Raj G <Sridharr@i...> on Thu, 7 Feb 2002 18:07:52 +0530
|
|
Hi
Even change this line
> Dim MailMsg As New MailMessage()
to
> Dim MailMsg As New Mail()
Since you instanced an obje as mail to SmtpMail() am i right.
Regards
Sridhar G
-----Original Message-----
From: Hugh McLaughlin [mailto:hugh@k...]
Sent: Thursday, February 07, 2002 6:06 PM
To: ASP+
Subject: [aspx] RE: Problems sending EMail with ASP.Net
Thanks for your help. Ufortunately, I made the changes and received this:
The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for hugh@k...
I have verified that the SMTP services are running as I can send email via
ASP and CDONTS from the same machine.
> Hi.,
>
> Mail.Send(MailMsg)
> This will not work you have exclusive call the SmtpMail obj
> Try doing
> SmtpMail.Send(MailMsg)
>
> SmtpMail.SmtpServer = "machine"
> SmtpMail.Send(message)
>
> and even call the server name then only it will in .NET
>
> Regards
> Sridhar G
>
> -----Original Message-----
> From: Hugh McLaughlin [mailto:hugh@k...]
> Sent: Thursday, February 07, 2002 5:24 PM
> To: ASP+
> Subject: [aspx] Problems sending EMail with ASP.Net
>
>
> Helloe everyone and thanks for your help in advance. I had developed
some
> code in Beta 2 to send emails with ASP.Net, but now it doesn't work with
> version 1
>
> Here is the code:
> Dim Mail As SmtpMail()
> Dim MailMsg As New MailMessage()
> MailMsg.To = "hugh@k..."
> MailMsg.From = "hugh@k..."
> MailMsg.BodyFormat = MailFormat.Html
> MailMsg.Priority = MailPriority.High
> MailMsg.Subject = "Test Message"
> MailMsg.Body = "Test Message"
> Dim FileName As String = "D:\Test.txt"
> MailMsg.Attachments.Add(New MailAttachment(FileName))
>
> Mail.Send(MailMsg)
>
> Mail = Nothing
> MailMsg = Nothing
>
> I get the following error:
>
> Compiler Error Message: BC30456: 'Send' is not a member
of 'System.Array'.
>
> I have looked at the documentation, but can't seem to figure things out.
>
> Any help would be greatly appreciated.
>
> Thanks.
>
Message #5 by ToddC@m... on Thu, 7 Feb 2002 07:49:32 -0600
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1AFDE.4519BE00
Content-Type: text/plain
You have fixed your .NET problem and now you have an SMTP configuration
problem.
You said you can send using ASP and CDONTS. Did you use the same recipient
for both tests?
Also, what are the settings in your relay tab of the SMTP server Properties?
tc
-----Original Message-----
From: Hugh McLaughlin [mailto:hugh@k...]
Sent: Thursday, February 07, 2002 6:36 AM
To: ASP+
Subject: [aspx] RE: Problems sending EMail with ASP.Net
Thanks for your help. Ufortunately, I made the changes and received this:
The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for hugh@k...
I have verified that the SMTP services are running as I can send email via
ASP and CDONTS from the same machine.
> Hi.,
>
> Mail.Send(MailMsg)
> This will not work you have exclusive call the SmtpMail obj
> Try doing
> SmtpMail.Send(MailMsg)
>
> SmtpMail.SmtpServer = "machine"
> SmtpMail.Send(message)
>
> and even call the server name then only it will in .NET
>
> Regards
> Sridhar G
>
> -----Original Message-----
> From: Hugh McLaughlin [mailto:hugh@k...]
> Sent: Thursday, February 07, 2002 5:24 PM
> To: ASP+
> Subject: [aspx] Problems sending EMail with ASP.Net
>
>
> Helloe everyone and thanks for your help in advance. I had developed
some
> code in Beta 2 to send emails with ASP.Net, but now it doesn't work with
> version 1
>
> Here is the code:
> Dim Mail As SmtpMail()
> Dim MailMsg As New MailMessage()
> MailMsg.To = "hugh@k..."
> MailMsg.From = "hugh@k..."
> MailMsg.BodyFormat = MailFormat.Html
> MailMsg.Priority = MailPriority.High
> MailMsg.Subject = "Test Message"
> MailMsg.Body = "Test Message"
> Dim FileName As String = "D:\Test.txt"
> MailMsg.Attachments.Add(New MailAttachment(FileName))
>
> Mail.Send(MailMsg)
>
> Mail = Nothing
> MailMsg = Nothing
>
> I get the following error:
>
> Compiler Error Message: BC30456: 'Send' is not a member
of 'System.Array'.
>
> I have looked at the documentation, but can't seem to figure things out.
>
> Any help would be greatly appreciated.
>
> Thanks.
>
Message #6 by "Hugh McLaughlin" <hugh@k...> on Thu, 7 Feb 2002 23:06:42
|
|
Yes, I used the same recipient for both tests.
On the relays tab, I must plead (and sound ignorant) sine I am not sure
where to look to find this.
Thanks for your help.
> This message is in MIME format. Since your mail reader does not
understand
> this format, some or all of this message may not be legible.
>
> ------_=_NextPart_001_01C1AFDE.4519BE00
> Content-Type: text/plain
>
> You have fixed your .NET problem and now you have an SMTP configuration
> problem.
>
> You said you can send using ASP and CDONTS. Did you use the same
recipient
> for both tests?
>
> Also, what are the settings in your relay tab of the SMTP server
Properties?
>
> tc
>
> -----Original Message-----
> From: Hugh McLaughlin [mailto:hugh@k...]
> Sent: Thursday, February 07, 2002 6:36 AM
> To: ASP+
> Subject: [aspx] RE: Problems sending EMail with ASP.Net
>
> Thanks for your help. Ufortunately, I made the changes and received
this:
>
>
> The server rejected one or more recipient addresses. The server response
> was: 550 5.7.1 Unable to relay for hugh@k...
>
> I have verified that the SMTP services are running as I can send email
via
> ASP and CDONTS from the same machine.
> > Hi.,
> >
> > Mail.Send(MailMsg)
> > This will not work you have exclusive call the SmtpMail obj
> > Try doing
> > SmtpMail.Send(MailMsg)
> >
> > SmtpMail.SmtpServer = "machine"
> > SmtpMail.Send(message)
> >
> > and even call the server name then only it will in .NET
> >
> > Regards
> > Sridhar G
> >
> > -----Original Message-----
> > From: Hugh McLaughlin [mailto:hugh@k...]
> > Sent: Thursday, February 07, 2002 5:24 PM
> > To: ASP+
> > Subject: [aspx] Problems sending EMail with ASP.Net
> >
> >
> > Helloe everyone and thanks for your help in advance. I had developed
> some
> > code in Beta 2 to send emails with ASP.Net, but now it doesn't work
with
> > version 1
> >
> > Here is the code:
> > Dim Mail As SmtpMail()
> > Dim MailMsg As New MailMessage()
> > MailMsg.To = "hugh@k..."
> > MailMsg.From = "hugh@k..."
> > MailMsg.BodyFormat = MailFormat.Html
> > MailMsg.Priority = MailPriority.High
> > MailMsg.Subject = "Test Message"
> > MailMsg.Body = "Test Message"
> > Dim FileName As String = "D:\Test.txt"
> > MailMsg.Attachments.Add(New MailAttachment(FileName))
> >
> > Mail.Send(MailMsg)
> >
> > Mail = Nothing
> > MailMsg = Nothing
> >
> > I get the following error:
> >
> > Compiler Error Message: BC30456: 'Send' is not a member
> of 'System.Array'.
> >
> > I have looked at the documentation, but can't seem to figure things
out.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks.
> >
>
>
> ------_=_NextPart_001_01C1AFDE.4519BE00
> Content-Type: text/html
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
> <TITLE>RE: [aspx] RE: Problems sending EMail with ASP.Net</TITLE>
> </HEAD>
> <BODY>
>
> <P><FONT SIZE=2>You have fixed your .NET problem and now you have an
SMTP configuration problem.</FONT>
> </P>
>
> <P><FONT SIZE=2>You said you can send using ASP and CDONTS. Did
you use the same recipient for both tests?</FONT>
> </P>
>
> <P><FONT SIZE=2>Also, what are the settings in your relay tab of the
SMTP server Properties?</FONT>
> </P>
>
> <P><FONT SIZE=2>tc</FONT>
> </P>
>
> <P><FONT SIZE=2>-----Original Message-----</FONT>
> <BR><FONT SIZE=2>From: Hugh McLaughlin [<A
HREF="mailto:hugh@k...">mailto:hugh@k...</A>] </FONT>
> <BR><FONT SIZE=2>Sent: Thursday, February 07, 2002 6:36 AM</FONT>
> <BR><FONT SIZE=2>To: ASP+</FONT>
> <BR><FONT SIZE=2>Subject: [aspx] RE: Problems sending EMail with
ASP.Net</FONT>
> </P>
>
> <P><FONT SIZE=2>Thanks for your help. Ufortunately, I made the
changes and received this:</FONT>
> </P>
> <BR>
>
> <P><FONT SIZE=2>The server rejected one or more recipient addresses. The
server response </FONT>
> <BR><FONT SIZE=2>was: 550 5.7.1 Unable to relay for
hugh@k...</FONT>
> </P>
>
> <P><FONT SIZE=2>I have verified that the SMTP services are running as I
can send email via </FONT>
> <BR><FONT SIZE=2>ASP and CDONTS from the same machine.</FONT>
> <BR><FONT SIZE=2>> Hi.,</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Mail.Send(MailMsg)</FONT>
> <BR><FONT SIZE=2>> This will not work you have exclusive call the
SmtpMail obj</FONT>
> <BR><FONT SIZE=2>> Try doing</FONT>
> <BR><FONT SIZE=2>> SmtpMail.Send(MailMsg)</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> SmtpMail.SmtpServer = "machine"</FONT>
> <BR><FONT SIZE=2>> SmtpMail.Send(message)</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> and even call the server name then only it will
in .NET</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Regards</FONT>
> <BR><FONT SIZE=2>> Sridhar G</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> -----Original Message-----</FONT>
> <BR><FONT SIZE=2>> From: Hugh McLaughlin [<A
HREF="mailto:hugh@k...">mailto:hugh@k...</A>]</FONT>
> <BR><FONT SIZE=2>> Sent: Thursday, February 07, 2002 5:24 PM</FONT>
> <BR><FONT SIZE=2>> To: ASP+</FONT>
> <BR><FONT SIZE=2>> Subject: [aspx] Problems sending EMail with
ASP.Net</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Helloe everyone and thanks for your help in
advance. I had developed </FONT>
> <BR><FONT SIZE=2>some </FONT>
> <BR><FONT SIZE=2>> code in Beta 2 to send emails with ASP.Net, but
now it doesn't work with </FONT>
> <BR><FONT SIZE=2>> version 1</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Here is the code:</FONT>
> <BR><FONT SIZE=2>> Dim Mail As SmtpMail()
</FONT>
> <BR><FONT SIZE=2>> Dim MailMsg As New
MailMessage()</FONT>
> <BR><FONT SIZE=2>> MailMsg.To =
"hugh@k..."</FONT>
> <BR><FONT SIZE=2>> MailMsg.From =
"hugh@k..."</FONT>
> <BR><FONT SIZE=2>> MailMsg.BodyFormat =
MailFormat.Html</FONT>
> <BR><FONT SIZE=2>> MailMsg.Priority =
MailPriority.High</FONT>
> <BR><FONT SIZE=2>> MailMsg.Subject =
"Test Message"</FONT>
> <BR><FONT SIZE=2>> MailMsg.Body = "Test
Message"</FONT>
> <BR><FONT SIZE=2>> Dim FileName As String =
"D:\Test.txt"</FONT>
> <BR><FONT SIZE=2>> MailMsg.Attachments.Add
(New MailAttachment(FileName))</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Mail.Send(MailMsg)</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Mail = Nothing</FONT>
> <BR><FONT SIZE=2>> MailMsg = Nothing</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> I get the following error:</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Compiler Error Message: BC30456: 'Send' is not a
member </FONT>
> <BR><FONT SIZE=2>of 'System.Array'.</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> I have looked at the documentation, but can't seem
to figure things out.</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Any help would be greatly appreciated.</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> Thanks.</FONT>
> <BR><FONT SIZE=2>> </FONT>
> <BR><FONT SIZE=2>> ---</FONT>
> <BR><FONT SIZE=2>> Change your mail options at <A
HREF="http://p2p.wrox.com/manager.asp"
TARGET="_blank">http://p2p.wrox.com/manager.asp</A> or </FONT>
> <BR><FONT SIZE=2>> to unsubscribe send a blank email to $subst
('Email.Unsub').</FONT>
> </P>
>
> <P><FONT SIZE=2>---</FONT>
> <BR><FONT SIZE=2>Change your mail options at <A
HREF="http://p2p.wrox.com/manager.asp"
TARGET="_blank">http://p2p.wrox.com/manager.asp</A> or </FONT>
> <BR><FONT SIZE=2>to unsubscribe send a blank email to $subst
('Email.Unsub').</FONT>
> </P>
>
> </BODY>
> </HTML>
> ------_=_NextPart_001_01C1AFDE.4519BE00--
|
|
 |