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

how to send emails via aspx

P: n/a
i have made a command button and on the click event of
the button following code is mentioned:

im mailnew As New MailMessage()
mailnew.From = "fi*****************@mobilink.net"
mailnew.To = "fa******@mobilink.net"
mailnew.Cc = "fi*****************@mobilink.net"
mailNew.Subject = "New Record Entered
Successfully"
mailNew.Body = "Data successfully entered by user
farhan.w"
SmtpMail.Send(mailNew)

now when i click the command button nothing happens,
neither i rcv any emails. We are using exchange server
and proper rights are being assigned to the user sending
this email "financialadjustments" is the user authorized
please help
Nov 19 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
You're not specifying an smtp server.

If you don't do that, the default smtpserver is localhost.

When I use "localhost" for an smtp server, mail is never sent.

When I specify an smtp server by name, mail gets sent.

Are you using your own smtp server ?

Or are you specifying an smtp server to which
you have a right to access, or a smart host ?

The format to specify your smtp server is :

SmtpMail.SmtpServer = "mail.whatever.com"
( any valid mail server name )


Juan T. Llibre
ASP.NET MVP
===========
"farhan wajahat" <fa******@mobilink.net> wrote in message
news:18****************************@phx.gbl...
i have made a command button and on the click event of
the button following code is mentioned:

im mailnew As New MailMessage()
mailnew.From = "fi*****************@mobilink.net"
mailnew.To = "fa******@mobilink.net"
mailnew.Cc = "fi*****************@mobilink.net"
mailNew.Subject = "New Record Entered
Successfully"
mailNew.Body = "Data successfully entered by user
farhan.w"
SmtpMail.Send(mailNew)

now when i click the command button nothing happens,
neither i rcv any emails. We are using exchange server
and proper rights are being assigned to the user sending
this email "financialadjustments" is the user authorized
please help

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.794 / Virus Database: 538 - Release Date: 10/11/2004
Nov 19 '05 #2

P: n/a
i am specifying the mail server now in the same code as
per mentioned but i am still unable to send any mail.
What could be the issue?
-----Original Message-----
You're not specifying an smtp server.

If you don't do that, the default smtpserver is localhost.
When I use "localhost" for an smtp server, mail is never sent.
When I specify an smtp server by name, mail gets sent.

Are you using your own smtp server ?

Or are you specifying an smtp server to which
you have a right to access, or a smart host ?

The format to specify your smtp server is :

SmtpMail.SmtpServer = "mail.whatever.com"
( any valid mail server name )


Juan T. Llibre
ASP.NET MVP
===========
"farhan wajahat" <fa******@mobilink.net> wrote in messagenews:18****************************@phx.gbl...
i have made a command button and on the click event of
the button following code is mentioned:

im mailnew As New MailMessage()
mailnew.From = "fi*****************@mobilink.net" mailnew.To = "fa******@mobilink.net"
mailnew.Cc = "fi*****************@mobilink.net"
mailNew.Subject = "New Record Entered
Successfully"
mailNew.Body = "Data successfully entered by user farhan.w"
SmtpMail.Send(mailNew)

now when i click the command button nothing happens,
neither i rcv any emails. We are using exchange server
and proper rights are being assigned to the user sending this email "financialadjustments" is the user authorized please help

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system

(http://www.grisoft.com).Version: 6.0.794 / Virus Database: 538 - Release Date: 10/11/2004

.

Nov 19 '05 #3

P: n/a
yes i have smtp server to which i have rights to access
what to do now? i am specifying the server name i.e
xyz.abc.net but the mail is not sent
-----Original Message-----
You're not specifying an smtp server.

If you don't do that, the default smtpserver is localhost.
When I use "localhost" for an smtp server, mail is never sent.
When I specify an smtp server by name, mail gets sent.

Are you using your own smtp server ?

Or are you specifying an smtp server to which
you have a right to access, or a smart host ?

The format to specify your smtp server is :

SmtpMail.SmtpServer = "mail.whatever.com"
( any valid mail server name )


Juan T. Llibre
ASP.NET MVP
===========
"farhan wajahat" <fa******@mobilink.net> wrote in messagenews:18****************************@phx.gbl...
i have made a command button and on the click event of
the button following code is mentioned:

im mailnew As New MailMessage()
mailnew.From = "fi*****************@mobilink.net" mailnew.To = "fa******@mobilink.net"
mailnew.Cc = "fi*****************@mobilink.net"
mailNew.Subject = "New Record Entered
Successfully"
mailNew.Body = "Data successfully entered by user farhan.w"
SmtpMail.Send(mailNew)

now when i click the command button nothing happens,
neither i rcv any emails. We are using exchange server
and proper rights are being assigned to the user sending this email "financialadjustments" is the user authorized please help

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system

(http://www.grisoft.com).Version: 6.0.794 / Virus Database: 538 - Release Date: 10/11/2004

.

Nov 19 '05 #4

P: n/a
Post your complete code
( without your smtp server name )
and I'll check it out locally.

Juan T. Llibre
ASP.NET MVP
===========
"farhan wajahat" <fa******@mobilink.net> wrote in message
news:0f****************************@phx.gbl...
i am specifying the mail server now in the same code as
per mentioned but i am still unable to send any mail.
What could be the issue?
-----Original Message-----
You're not specifying an smtp server.

If you don't do that, the default smtpserver is

localhost.

When I use "localhost" for an smtp server, mail is never

sent.

When I specify an smtp server by name, mail gets sent.

Are you using your own smtp server ?

Or are you specifying an smtp server to which
you have a right to access, or a smart host ?

The format to specify your smtp server is :

SmtpMail.SmtpServer = "mail.whatever.com"
( any valid mail server name )


Juan T. Llibre
ASP.NET MVP
===========
"farhan wajahat" <fa******@mobilink.net> wrote in

message
news:18****************************@phx.gbl...
i have made a command button and on the click event of
the button following code is mentioned:

im mailnew As New MailMessage()
mailnew.From = "fi*****************@mobilink.net" mailnew.To = "fa******@mobilink.net"
mailnew.Cc = "fi*****************@mobilink.net"
mailNew.Subject = "New Record Entered
Successfully"
mailNew.Body = "Data successfully entered by user farhan.w"
SmtpMail.Send(mailNew)

now when i click the command button nothing happens,
neither i rcv any emails. We are using exchange server
and proper rights are being assigned to the user sending this email "financialadjustments" is the user authorized please help

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system

(http://www.grisoft.com).
Version: 6.0.794 / Virus Database: 538 - Release Date:

10/11/2004


.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.794 / Virus Database: 538 - Release Date: 10/11/2004
Nov 19 '05 #5

P: n/a
On Mon, 10 Jan 2005 00:25:04 -0800, "farhan wajahat" <fa******@mobilink.net>
wrote:
i have made a command button and on the click event of
the button following code is mentioned:

im mailnew As New MailMessage()
mailnew.From = "fi*****************@mobilink.net"
mailnew.To = "fa******@mobilink.net"
mailnew.Cc = "fi*****************@mobilink.net"
mailNew.Subject = "New Record Entered
Successfully"
mailNew.Body = "Data successfully entered by user
farhan.w"
SmtpMail.Send(mailNew)

now when i click the command button nothing happens,
neither i rcv any emails. We are using exchange server
and proper rights are being assigned to the user sending
this email "financialadjustments" is the user authorized
please help


First question is, is the mail appearing in your SMTP queue?

Jim

Nov 19 '05 #6

P: n/a

i have made a command button and on the click event of
the button following code is mentioned:

im mailnew As New MailMessage()
mailnew.From = "fi*****************@mobilink.net"
mailnew.To = "fa******@mobilink.net"
mailnew.Cc = "fi*****************@mobilink.net"
mailNew.Subject = "New Record Entered
Successfully"
mailNew.Body = "Data successfully entered by user
farhan.w"
SmtpMail.Send(mailNew)

now when i click the command button nothing happens,
neither i rcv any emails. We are using exchange server
and proper rights are being assigned to the user sending
this email "financialadjustments" is the user authorized
please hel


User submitted from AEWNET (http://www.aewnet.com/)
Nov 19 '05 #7

P: n/a
Where do you assign the SmtpServer to use for sending the email?

"Guest" <Guest@aew_nospam.com> wrote in message
news:uo**************@TK2MSFTNGP09.phx.gbl...

i have made a command button and on the click event of
the button following code is mentioned:

im mailnew As New MailMessage()
mailnew.From = "fi*****************@mobilink.net"
mailnew.To = "fa******@mobilink.net"
mailnew.Cc = "fi*****************@mobilink.net"
mailNew.Subject = "New Record Entered
Successfully"
mailNew.Body = "Data successfully entered by user
farhan.w"
SmtpMail.Send(mailNew)

now when i click the command button nothing happens,
neither i rcv any emails. We are using exchange server
and proper rights are being assigned to the user sending
this email "financialadjustments" is the user authorized
please help


User submitted from AEWNET (http://www.aewnet.com/)

Nov 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.