473,748 Members | 9,933 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending email problem - Urgent pls

Hi,

I'm using the bellow code to send emails in a Website that I uploaded in one
of my client's server where it has SMTP installed, BUT some users are
receiving email some others aren't !!?So, what could be the problem? knowing
that all users are using the same code and hitting the same server.

MailMessage objMailMsg = new MailMessage(str From,
strTo);objMailM sg.BodyEncoding = Encoding.UTF8;
objMailMsg.Subj ect = strSubject;

objMailMsg.Body = strMsg;

if (Session["PDF_Path"] != null)
{

AttachmentPath = Session["PDF_Path"].ToString();

Attachment at = new Attachment(Serv er.MapPath(Atta chmentPath));
objMailMsg.Atta chments.Add(at) ;

}

objMailMsg.Prio rity = MailPriority.Hi gh;
objMailMsg.IsBo dyHtml = true;

SmtpClient objSMTPClient = new SmtpClient(); objSMTPClient.D eliveryMethod =
SmtpDeliveryMet hod.PickupDirec toryFromIis;
objSMTPClient.S end(objMailMsg) ;

--
Regards,
M.Rochdi
Sep 20 '07 #1
3 1451
1. ) Are any exceptions being generated when the message is being sent.

2.) Is it allways the same users who do not receive the attachment.

3.) Is the email content the same for all users.

4.) If 2.) is true, then what is different about their email addresses and
are those users able to receive SMTP messages from other sources. ?
HTH

"Mike" <Mi**@discussio ns.microsoft.co mwrote in message
news:68******** *************** ***********@mic rosoft.com...
Hi,

I'm using the bellow code to send emails in a Website that I uploaded in
one
of my client's server where it has SMTP installed, BUT some users are
receiving email some others aren't !!?So, what could be the problem?
knowing
that all users are using the same code and hitting the same server.

MailMessage objMailMsg = new MailMessage(str From,
strTo);objMailM sg.BodyEncoding = Encoding.UTF8;
objMailMsg.Subj ect = strSubject;

objMailMsg.Body = strMsg;

if (Session["PDF_Path"] != null)
{

AttachmentPath = Session["PDF_Path"].ToString();

Attachment at = new Attachment(Serv er.MapPath(Atta chmentPath));
objMailMsg.Atta chments.Add(at) ;

}

objMailMsg.Prio rity = MailPriority.Hi gh;
objMailMsg.IsBo dyHtml = true;

SmtpClient objSMTPClient = new SmtpClient(); objSMTPClient.D eliveryMethod
=
SmtpDeliveryMet hod.PickupDirec toryFromIis;
objSMTPClient.S end(objMailMsg) ;

--
Regards,
M.Rochdi

Sep 20 '07 #2
Are only the emails with attachments blocked? I had a problem once where
e-mail filtering software (on the client's network) actively blocked (e-mails
with) pdf attachments.
The filtering rules had to be changed to allow them.

Hans Kesting

Hi,

I'm using the bellow code to send emails in a Website that I uploaded
in one of my client's server where it has SMTP installed, BUT some
users are receiving email some others aren't !!?So, what could be the
problem? knowing that all users are using the same code and hitting
the same server.

MailMessage objMailMsg = new MailMessage(str From,
strTo);objMailM sg.BodyEncoding = Encoding.UTF8; objMailMsg.Subj ect =
strSubject;

objMailMsg.Body = strMsg;

if (Session["PDF_Path"] != null) {

AttachmentPath = Session["PDF_Path"].ToString();

Attachment at = new Attachment(Serv er.MapPath(Atta chmentPath));
objMailMsg.Atta chments.Add(at) ;

}

objMailMsg.Prio rity = MailPriority.Hi gh; objMailMsg.IsBo dyHtml = true;

SmtpClient objSMTPClient = new SmtpClient();
objSMTPClient.D eliveryMethod =
SmtpDeliveryMet hod.PickupDirec toryFromIis;
objSMTPClient.S end(objMailMsg) ;

Sep 20 '07 #3
Do you have multiple email addresses in strTo seperated by semi-colons?
I had a similar issue too. I think it has to do with the new
System.Net.Mail namespace in .NET 2.0 instead of the System.Web.Mail in
1.1 Try this way

MailMessage objMailMsg = new MailMessage();
objMailMsg.From = new MailAddress(str From);

//put this in a loop and add all the recipients one by one to the collection
objMailMsg.To.A dd(strRecipient );
....
....
objMailMsg.Subj ect = subject;
objMailMsg.Body = body;
....
objMailMsg.Atta chments.Add(at) ;

....

objSMTPClient.S end(objMailMsg) ;

Mike wrote:
Hi,

I'm using the bellow code to send emails in a Website that I uploaded in one
of my client's server where it has SMTP installed, BUT some users are
receiving email some others aren't !!?So, what could be the problem? knowing
that all users are using the same code and hitting the same server.

MailMessage objMailMsg = new MailMessage(str From,
strTo);objMailM sg.BodyEncoding = Encoding.UTF8;
objMailMsg.Subj ect = strSubject;

objMailMsg.Body = strMsg;

if (Session["PDF_Path"] != null)
{

AttachmentPath = Session["PDF_Path"].ToString();

Attachment at = new Attachment(Serv er.MapPath(Atta chmentPath));
objMailMsg.Atta chments.Add(at) ;

}

objMailMsg.Prio rity = MailPriority.Hi gh;
objMailMsg.IsBo dyHtml = true;

SmtpClient objSMTPClient = new SmtpClient(); objSMTPClient.D eliveryMethod =
SmtpDeliveryMet hod.PickupDirec toryFromIis;
objSMTPClient.S end(objMailMsg) ;
Sep 20 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3027
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I need to send data from my server via the post method to the payment server. The payment server does not run asp.net. I dont know what they run. The payment server then returns to my server with the
8
2501
by: Mike Owen | last post by:
Hi, I am using the following code to send email on a Windows 2003 Web Server: Imports System.Net.Mail ........ Dim msgmail As New MailMessage msgmail.To.Add(New MailAddress(objMember.EmailAddress)) msgmail.From = New
14
9899
by: sridhar | last post by:
iam having user account on an exchangeserver. with that can i send an email using python? if iam using the following code iam getting error fromAddress = 'sridhar_kasturi@satyam.com' toAddress = 'sridhar_kasturi@satyam.com' msg = "Subject: Hello\n\nThis is the body of the message." import smtplib
6
2357
by: lalit26011983 | last post by:
Can any1 help me... How to send emails using asp.net.. I m using windows 2000 server and visual studio 2003(.net framework 1.1) I m not getting any error while i m sending email using asp.net(With SMTP) but the receiver is not getting mail... It's very URGENT.... I already set connection(127.0.0.1) and Relay(127.0.0.1) using Inetmgr(Default SMTP Virtual Server)...... Plz help me.... Thanks....
3
3880
by: moondaddy | last post by:
I have some code in a web app (asp.net 2.0) and am trying to send an email to 2 different recipients. The first one works and the second one fails. the first email address is of the same domain as the web app (myAp.com, me@myAp.com) and the second one is of a different domain (me@OtherDomain.com). Why would the 2nd address fail? here's the error msg Mailbox unavailable. The server response was: not local host OtherDomain.com, not a...
2
3030
by: steve | last post by:
Hi All I need to learn how to update a SQl server or Access database located on a web server from my windows forms application, via the internet I have a customer who wants to run several windows forms applications in different shop locations but all have to update a Web based database with products sold etc Is Web services the way to go? or are there better options
3
1321
by: pradeepdeepu | last post by:
hi, sorry for replying like this.Below is my html code.I need to send all field values to email id.I must do it in PHP,but i don't no php. Please help me by sending code for this html page.It is very urgent. <html> <head> <title>Enter your name</title> </head> <body> <p>&nbsp;</p> <form method="POST" action="process.php">
3
3731
by: yuvaverve | last post by:
hi, i have problem in email sending to 1and1 server... the error given below System.Web.HttpException: At least one of the From or Sender fields is required, and neither was found. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x8004020D): At least one of the From or Sender fields is required, and neither was found. --- End of...
7
8559
by: Paridevi | last post by:
Hai , i want to send email in .Net Using OutLook Express,My Project is Web Application using vb.Net 2003 with SQL Server 2000.I have searched a lot in Google, but ican't get any details. Pls its urgent for me. Can any one give me any idea about this. Thanks in advance Pari
2
2761
ThatThatGuy
by: ThatThatGuy | last post by:
Hello reader,, This might be a very simple question, but what to just say about it, i'm facing it Actually i'm developing a web App and i want email feature in that.... I'm sending mail from my development machine i.e localhost This is the setting in web.config <system.net> <mailSettings>
0
8831
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9548
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9249
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.