Wrox Home  
Search P2P Archive for: Go

  Return to Index  

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.&nbsp; 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.&nbsp; 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>&gt; Hi.,</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; Mail.Send(MailMsg)</FONT>

> <BR><FONT SIZE=2>&gt; This will not work you have exclusive call the 

SmtpMail obj</FONT>

> <BR><FONT SIZE=2>&gt; Try doing</FONT>

> <BR><FONT SIZE=2>&gt; SmtpMail.Send(MailMsg)</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; SmtpMail.SmtpServer = &quot;machine&quot;</FONT>

> <BR><FONT SIZE=2>&gt; SmtpMail.Send(message)</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; and even call the server name then only it will 

in .NET</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; Regards</FONT>

> <BR><FONT SIZE=2>&gt; Sridhar G</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; -----Original Message-----</FONT>

> <BR><FONT SIZE=2>&gt; From: Hugh McLaughlin [<A 

HREF="mailto:hugh@k...">mailto:hugh@k...</A>]</FONT>

> <BR><FONT SIZE=2>&gt; Sent: Thursday, February 07, 2002 5:24 PM</FONT>

> <BR><FONT SIZE=2>&gt; To: ASP+</FONT>

> <BR><FONT SIZE=2>&gt; Subject: [aspx] Problems sending EMail with 

ASP.Net</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; Helloe everyone and thanks for your help in 

advance.&nbsp; I had developed </FONT>

> <BR><FONT SIZE=2>some </FONT>

> <BR><FONT SIZE=2>&gt; code in Beta 2 to send emails with ASP.Net, but 

now it doesn't work with </FONT>

> <BR><FONT SIZE=2>&gt; version 1</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; Here is the code:</FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Dim Mail As SmtpMail()

</FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Dim MailMsg As New 

MailMessage()</FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; MailMsg.To = 

&quot;hugh@k...&quot;</FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; MailMsg.From = 

&quot;hugh@k...&quot;</FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; MailMsg.BodyFormat = 

MailFormat.Html</FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; MailMsg.Priority = 

MailPriority.High</FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; MailMsg.Subject = 

&quot;Test Message&quot;</FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; MailMsg.Body = &quot;Test 

Message&quot;</FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Dim FileName As String = 

&quot;D:\Test.txt&quot;</FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; MailMsg.Attachments.Add

(New MailAttachment(FileName))</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Mail.Send(MailMsg)</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Mail = Nothing</FONT>

> <BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp; MailMsg = Nothing</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; I get the following error:</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; Compiler Error Message: BC30456: 'Send' is not a 

member </FONT>

> <BR><FONT SIZE=2>of 'System.Array'.</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; I have looked at the documentation, but can't seem 

to figure things out.</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; Any help would be greatly appreciated.</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; Thanks.</FONT>

> <BR><FONT SIZE=2>&gt; </FONT>

> <BR><FONT SIZE=2>&gt; ---</FONT>

> <BR><FONT SIZE=2>&gt; 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>&gt; 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--


  Return to Index