473,387 Members | 3,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problems with sending Email

304 100+
Hi,
I would like to know whether sending mails through the classes available in .NET is a good idea or not. If no, then what are the other alternatives?

i.e. I see that the mails don't always get delivered.

Any insight would be appreciated.

Thanks,
Gomzi.
Jun 15 '07 #1
9 1314
nateraaaa
663 Expert 512MB
Hi,
I would like to know whether sending mails through the classes available in .NET is a good idea or not. If no, then what are the other alternatives?

i.e. I see that the mails don't always get delivered.

Any insight would be appreciated.

Thanks,
Gomzi.
I use the System.Web.Mail class all the time. The only time the emails do not get delivered is if an exception is thrown while trying to send the email. Be sure to set up a try catch block around your email code and handle the exception if the code fails. I generally write my exceptions to the Event Viewer so I can get information on why the code failed.

Nathan
Jun 15 '07 #2
gomzi
304 100+
I use the System.Web.Mail class all the time. The only time the emails do not get delivered is if an exception is thrown while trying to send the email. Be sure to set up a try catch block around your email code and handle the exception if the code fails. I generally write my exceptions to the Event Viewer so I can get information on why the code failed.

Nathan
Thanks Nathan. Well... I too use a try catch block, but the problem I face is that the mailing process doesn't throw any exception, its just that the mails simply don't get delivered.
Am facing this problem only with microsoft outlook. I don't have any problems with gmail or other such service providers.
Jun 15 '07 #3
Frinavale
9,735 Expert Mod 8TB
Just a suggestion.
Try using System.Net.Mail instead of System.Web.Mail. The later is obsolete now (unless you're using .Net Framework 1.x).

Nathan's right about the exception being thrown when an email fails to send...you should keep a log of this.

-Frinny
Jun 15 '07 #4
gomzi
304 100+
Just a suggestion.
Try using System.Net.Mail instead of System.Web.Mail. The later is obsolete now (unless you're using .Net Framework 1.x).

Nathan's right about the exception being thrown when an email fails to send...you should keep a log of this.

-Frinny
Thanks Frinny. I use System.Net.Mail and I also store the emailid and other necessary stuff about my users in the database through some code in the catch section.

But, my problem is that the mails get sent without any problem on my side. But, they just dont get delivered to my clients. (especially the ones using microsoft outlook)
Jun 15 '07 #5
Frinavale
9,735 Expert Mod 8TB
Thanks Frinny. I use System.Net.Mail and I also store the emailid and other necessary stuff about my users in the database through some code in the catch section.

But, my problem is that the mails get sent without any problem on my side. But, they just dont get delivered to my clients. (especially the ones using microsoft outlook)
All the time?

-Frinny
Jun 15 '07 #6
gomzi
304 100+
All the time?

-Frinny

No. Not all the time. Most of the times.
Jun 16 '07 #7
Frinavale
9,735 Expert Mod 8TB
No. Not all the time. Most of the times.
It could be because of the user's email settings.
I myself have a block so that if you aren't on my email list, your email will not get through to me.
Jun 16 '07 #8
gomzi
304 100+
It could be because of the user's email settings.
I myself have a block so that if you aren't on my email list, your email will not get through to me.
Hmm....I see. Will check that out.

Also, sometimes, the mails when sent , arrive quite late. Any particular reasons for that?
i.e. late in the sense that they take around 2-3 hours sometimes.
Jun 16 '07 #9
senaka
23
Hmm....I see. Will check that out.

Also, sometimes, the mails when sent , arrive quite late. Any particular reasons for that?
i.e. late in the sense that they take around 2-3 hours sometimes.
Yep, may I ask you whether you are using a free mail account or an account which might be detected as spam on the recieving end? This might be your problem. The late delivery depends on the scheduling algorithms used on your smtp server or any other mail sending server.

Regards,
Senaka.
Jun 16 '07 #10

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

Similar topics

1
by: dan glenn | last post by:
I'm creating HTML emails from a PHP site and sending them out to an email list (just about 40 people so far are on this list). I've tested and confirmed that these emails work in yahoo.com's...
0
by: Nitec Dev | last post by:
Our setup: server1 ASP database running on IIS5, Outlook 2000 and SQL 2000 on Windows 2000. Server2 runs Windows 2000 with Exchange 2000 using CDO 1.2 MAPI Sessions. Clients use IE5/6 and had...
9
by: tshad | last post by:
This is a problem that we saw before on our asp site, but don't know how to fix it. We are seeing it on our .net site also. We have our email sending from our Windows 2003 server with exchange...
2
by: Tim V. | last post by:
Here's the layout: AIX v5.2, DB2 v8 fp8 running in 64bit I've got a Multi-partitioned db running on lpar4 and I want to connect it to 2 instances running on lpar13. We'll deal with just 1...
1
by: shots86 | last post by:
I am having problems sending emails via the CDO.Message object from an ASP script which was working fine. On the server I can still send emails via the CDO.Message from a .vbs script executed on...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
3
by: armando perez | last post by:
Hi, this is my first time here, but I was looking for something that may help me, and still, I haven't found something to use. I'm using a website made in .NET with C#, when I'm running my site...
2
by: oliu321 | last post by:
Hi, First I am not trying to write a client to talk with hotmail straightly. I am trying to write some codes to send emails through a SMTP server. I wrote a C++ version using pure socket...
71
by: desktop | last post by:
I have read in Bjarne Stroustrup that using malloc and free should be avoided in C++ because they deal with uninitialized memory and one should instead use new and delete. But why is that a...
5
by: Dave | last post by:
Hi All, I'm experiencing problems with sending mail using mail() to forwarded email accounts. The problem seems to revolve around the optional 4th argument of mail(), namely 'additional headers'....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.