469,356 Members | 2,013 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

sending mails using default SMTP server ..is not working ,help me.

83
Hii all,

I've been searching in the internet just to know abt SMTP server.

Can anybody tell me how to configure the SMTP server and how can i send the mails and how could i check whether they are deliverd or not ?

Plz provide me any links you've or give me a detailed explanation.

im using asp.net 2.0 .

Thank you..

--Tiru,
Oct 21 '08 #1
13 6369
PRR
750 Expert 512MB
Hii all,

I've been searching in the internet just to know abt SMTP server.

Can anybody tell me how to configure the SMTP server and how can i send the mails and how could i check whether they are deliverd or not ?

Plz provide me any links you've or give me a detailed explanation.

im using asp.net 2.0 .

Thank you..

--Tiru,
In your configuration file (web.config) for asp.net application

Expand|Select|Wrap|Line Numbers
  1.   <system.net>
  2.     <mailSettings>
  3.       <smtp from="you@yourdomain.com">
  4.         <network host="SMTP SERVER ADDRESS" port="25"
  5.          userName="USERNAME" password="PASSWORD">
  6.       </smtp>
  7.     </mailSettings>
  8.   </system.net>
  9.  
Oct 21 '08 #2
PRR
750 Expert 512MB
To know how to configure SMTP server .... have a look at this ...
Configuring SMTP server
Oct 21 '08 #3
btreddy
83
Thank you for de reply.

what is the SMTP address here tht i need to mention.and also the domain name ( i.e. yourdomain in your reply ).

Sorry im very new to SMTP.

Rgds,
Tiru.

In your configuration file (web.config) for asp.net application

Expand|Select|Wrap|Line Numbers
  1.   <system.net>
  2.     <mailSettings>
  3.       <smtp from="you@yourdomain.com">
  4.         <network host="SMTP SERVER ADDRESS" port="25"
  5.          userName="USERNAME" password="PASSWORD">
  6.       </smtp>
  7.     </mailSettings>
  8.   </system.net>
  9.  
Oct 21 '08 #4
Plater
7,872 Expert 4TB
Thank you for de reply.

what is the SMTP address here tht i need to mention.and also the domain name ( i.e. yourdomain in your reply ).

Sorry im very new to SMTP.

Rgds,
Tiru.
They are the names of the email server *YOU* will be using
Oct 21 '08 #5
PRR
750 Expert 512MB
Thank you for de reply.

what is the SMTP address here tht i need to mention.and also the domain name ( i.e. yourdomain in your reply ).

Sorry im very new to SMTP.

Rgds,
Tiru.
just in case you are working on a local PC.. without SMTP server installed ... you could still send mails to local folders

Expand|Select|Wrap|Line Numbers
  1. <system.net>
  2.     <mailSettings>
  3.       <smtp deliveryMethod="SpecifiedPickupDirectory">
  4.         <specifiedPickupDirectory pickupDirectoryLocation="C:\"/>
  5.  
  6.       </smtp>
  7.     </mailSettings>
  8.   </system.net>
  9.  
MSDN Link
Oct 21 '08 #6
btreddy
83
Hii all,

Im very new to SMTP Server and my req: is i need to send the mails from my local system.I searched in google for that and found some articles ..but none of them didn work for me.
all the mails are getting queued in the folder C:\Inetpub\mailroot\Queue.

i wann to send a mail from my local machine to a gmail account (for ex:) using the Default SMTP server.how can i do this .

what changes tht i need to make for the SMTP server.

I wasted 2 days of my time exploring this.

Plz help in this regards.

my boss is looking for my head...plz help me.
Oct 23 '08 #7
OuTCasT
374 256MB
I used a richtextbox to be sent as the email, whatever text is inside it can be sent.


Imports System.Net.Mail

Dim Email As String
Email = RichTextBox1.Text

Dim smtpClient As New SmtpClient
Dim objMail As New MailMessage

Dim objMail_fromAddress As New MailAddress("from@example.co.za")
Dim objMail_toAddress As New MailAddress("to@example.co.za")

objMail.From = objMail_fromAddress
objMail.To.Add(objMail_toAddress)

objMail.Subject = "Email Subject"

objMail.Body = Email

objMail.Priority = MailPriority.High

smtpClient.Host = "ip Address of SMTP(local)"

smtpClient.Send(objMail)
Oct 23 '08 #8
OuTCasT
374 256MB
This can be implemented in web form aswell as vbScript
Oct 23 '08 #9
btreddy
83
This can be implemented in web form aswell as vbScript
Hii Thanks for the reply.

How can we check whether the mail is delivered or not n how to view that mail.

Even i coded in the same way (i used C#).

actually my task is just to confirm tht we can send mails from the local machine using the local smtp service instead of connecting to my companys mail server.

if i put the host name as my companys mail server i was able to deliver it and able to see the mail in my inbox(outlook 2000),coz has given my credentials.

Rgds,
Tiru.
Oct 23 '08 #10
simple dear use CC for it . set any userid in cc to that u will get that mailed is sed or not

Hii Thanks for the reply.

How can we check whether the mail is delivered or not n how to view that mail.

Even i coded in the same way (i used C#).

actually my task is just to confirm tht we can send mails from the local machine using the local smtp service instead of connecting to my companys mail server.

if i put the host name as my companys mail server i was able to deliver it and able to see the mail in my inbox(outlook 2000),coz has given my credentials.

Rgds,
Tiru.
Oct 23 '08 #11
btreddy
83
Hi all ,

im using ASP.NET 2.0 and C# for code behind.

My task is just to send a mail using the Default SMTP server that comes
along with the IIS (OS is WinXP)

For tht i configured the SMTP server like this

propertied-->Access-->

Authentication -->selected anonymous acces.

Connection -->selected only the list below and added the ip add "127.0.0.1"

Relay-->selected only the list below and added the ip add "127.0.0.1"

my From address is myname@gmail.com

my To address is myname@mycompanyname.co.in

in the code part i mentioned Smtp.host=127.0.0.1
smtp.port=25

when i clik on the send button its not displaying any error message and
not delivering the mail also ..i put try and catch blocks ..but no error
message .

this is what the data in the log file.
10:54:05 127.0.0.1 QUIT - 0
10:54:31 127.0.0.1 EHLO - 250
10:54:31 127.0.0.1 MAIL - 250
10:54:31 127.0.0.1 RCPT - 250
10:54:31 127.0.0.1 RCPT - 250
10:54:31 127.0.0.1 DATA - 250

it seems its working but the mail is not getting delivered to the targetting
address.

Plz help me...corerect me where i was wrong.

Thanks in advance

Rgds,
Tiru.
Oct 28 '08 #12
Plater
7,872 Expert 4TB
Hmm that sequence looks roughly correct. Although some smtp servers don't send mail until you do another QUIT (it just queues them up)
I guess a few things to check would be:
Are there and firewalls blocking it? Symantic antivirus has an email watcher that could effect it too
Are the mails being marked as junk mail?
Have you tried a multitude of addresses that you know are correct, from different email hosts (gmail, hotmail, yahoo, etc, etc, etc)
Oct 28 '08 #13
btreddy
83
Hmm that sequence looks roughly correct. Although some smtp servers don't send mail until you do another QUIT (it just queues them up)
I guess a few things to check would be:
Are there and firewalls blocking it? Symantic antivirus has an email watcher that could effect it too
Are the mails being marked as junk mail?
Have you tried a multitude of addresses that you know are correct, from different email hosts (gmail, hotmail, yahoo, etc, etc, etc)
Hii Thanks for the reply.
i didn check for the firewalls...i'll check for that and you are right the mails are gathered in queue folder...

let me check for the firewall and antivirus settings.

rgds,
Tiru.
Oct 29 '08 #14

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Wojciech Kowaluk | last post: by
1 post views Thread by sindhu sweet | last post: by
reply views Thread by Bernhard Walle | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.