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

email problem

P: n/a
Hi Everybody,

I've upgraded the dot net framework from 1.0 to 1.1 onto the server and
everything seemed fine when it comes to sending attachments etc . However
just recently all emails that has attachments would not send properly.What I
mean is that the attachments are there but its only (64B) and will not open.
Also I have also created an application which simply sends out emails with
attachments and is coming up with the same problem. A couple of months back
I've use the "exact" application and it was working fine.

Does anybody know whats wrong?
I"ve also checked the smtp settings and everything seems fine.

Thanks in advance

Alex Ting
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.522 / Virus Database: 320 - Release Date: 29/09/2003
Jul 21 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Hi Alex,

Thanks for your post. As I understand, the problem you are facing is that
it System.Web.Mail does not work properly with attachments after you
installing .NET Framework 1.1. Please correct me if there is
misunderstanding. Now I'd like to share the following information with you:

I built a test Windows Form application in Visual Studio .NET 2003 to send
email with attachments, and it works on my side. I think more information
is needed before moving forward:

1. Did you uninstall .NET Framework 1.0 after installing .NET Framewrok
1.1? As you know, .NET Framework supports side-by-side execution, that is,
we are able to install multiple versions of the .NET Framework on a single
system and they will work without affecting one another.

Side-by-Side Execution of the .NET Framework
http://msdn.microsoft.com/library/de...us/dnnetdep/ht
ml/sidexsidenet.asp

2. Did you rebuilt your project in Visual Studio .NET 2003? Generally
speaking, VS .NET 2003 builds applications targets .NET Framework 1.1,
while VS .NET 2002 builds those targets .NET Framework 1.0.

3. Which SmtpServer do you specify in the application, local/remote SMTP,
smarthost, Exchange Server, etc? Does this problem also occurs when sending
email in Outlook or Outlook Express with the same account?

I am standing by for your response.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2

P: n/a
Hi Tian,

Thanks for your prompt reply. Unfortunately it is a rather strange
problem because I've sent out several emails on the server (using IIS
SMTP) and it was fine. However suddenly ever since it cannot send out
any attachments (attachments are seen but only 64B)

In response to your points:

1)We have 1.0 and 1.1 running side by side

2)Yes

3)IIS SMTP Server

Thanks in advance and I look forward to your repsonse

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #3

P: n/a
Hi Alex,

Thanks for your response. This behavior seems strange, and I did not find
any known issue about this problem.

I suggest to check the content of 64B attachments, please open it in
Notepad or Ultra Editor.

You can also check the logs file of SMTP service which locates at <Windows
Folder>\System32\Logfiles\SmtpSVC\.

How is the SMTP service configured? Does it support Relay? Did you specify
a "Smart host"?

I am standing by for your reply.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #4

P: n/a

Hi Huang,

These attachments are of type .tiff and of .pdf. I've opened the .tiff
attachments in the email with notepad and there is absolutely nothing in
there. The file name is correct as well as the extension but there is
nothing inside the file. I've checked the log files and all of it looks
like this:

#Software: Microsoft Internet Information Services 5.0
#Version: 1.0
#Date: 2003-10-02 00:37:01
#Fields: time c-ip cs-method cs-uri-stem sc-status
00:37:01 202.174.226.115 - - 0
00:37:01 202.174.226.115 EHLO - 0
00:37:01 202.174.226.115 - - 0
00:37:01 202.174.226.115 MAIL - 0
00:37:01 202.174.226.115 - - 0
00:37:01 202.174.226.115 RCPT - 0
00:37:01 202.174.226.115 RCPT - 0
00:37:01 202.174.226.115 - - 0
00:37:01 202.174.226.115 DATA - 0
00:37:01 202.174.226.115 - - 0
00:37:01 202.174.226.115 - - 0
00:37:01 202.174.226.115 RSET - 0
00:37:01 202.174.226.115 - - 0
00:37:01 202.174.226.115 MAIL - 0
00:37:01 202.174.226.115 - - 0
00:37:01 202.174.226.115 RCPT - 0
00:37:01 202.174.226.115 RCPT - 0
00:37:01 202.174.226.115 - - 0

if that makes any sense to you. It all looks normal to me as I've looked
in all of the other logs.

The smtp service is default from IIS (default SMTP virtual server) and
we have not adjusted any settings from before. (Windows 2000 advanced
server)

Thanks for your continuing support

Kind Regards
Alex Ting
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #5

P: n/a
Hello Alex,

Thanks for your response. I reviewed the SMTP log carefully, and it seems
to work properly.

Are you specify local or remote IIS SMTP Server? Is the IP address
202.174.226.115 your local server?

What's the email address you are testing again? Are you submitting email on
corpnet? Generally speaking, not allowing relay on a local SMTP service
will result in the exception "Could not access 'CDO.Message' object." when
sending email.

To narrow down the problem, I recommend you specify SmtpServer to other
SMTP server, smarthost or Exchange Server and check if the probem still
exists.

I look forward to hearing from you.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #6

P: n/a
Hi Tian,

Thank you for your continuing support. Your feedback is much appreciated
and valuable. This is a local IIS SMTP Server and the ip address is of
that server. I'm sending emails to a whole wide range of address and the
actual emails are being sent successfully. The code that is being used
to send emails:

public static bool sendEmailAttachment(string toEmailAddress, string
fromEmailAddress, string subject, string body, string fileLocation)
{
System.Web.Mail.MailMessage certificateMailMessage;
certificateMailMessage = new MailMessage();
certificateMailMessage.To=toEmailAddress;
certificateMailMessage.From = fromEmailAddress;
certificateMailMessage.Subject = subject;
certificateMailMessage.Body = body;
certificateMailMessage.Bcc=fromEmailAddress;
certificateMailMessage.Attachments.Add(new
MailAttachment(fileLocation));
SmtpMail.Send(certificateMailMessage);
return true;
}
The file attachment at the location is correct but for some reason its
not attaching it correctly. Could this be because of some of the
Microsoft Updates because we keep up to date to the latest releases?

Yes, I'm very familiar with the CDO.Message object because I have that
on my computer. Our website has an error logging procedure where it
emails the problems to us when there is an exception.

I will look further into specifying a different smtp server.

Kind Regards
Alex Ting

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #7

P: n/a
Hello Alex,

Thanks for your feedback.

I used to test almost the same code with yours, and it works properly with
attachments. (I explicitly specify the SmtpServer, while you will use the
default local SMTP server). Based on my experience and research, I believe
that this issue relates to the SMTP service configuration.

Please let me know the result of other SmtpServer test on your side. I am
standing by for your result.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.