all groups > dotnet academic > february 2005 >
You're in the

dotnet academic

group:

Make a mail with attachment in a windows apllication



Make a mail with attachment in a windows apllication Ton Mekking
2/20/2005 1:37:13 PM
dotnet academic: I am having a problem with attach a file to a mail-message i create in a
windows application.
I tried :
Dim myAttachment As New Attachment(sSubstr)

MyMail.Attachments.Add(myAttachment)

The result is an attached file with only the name of the intended file as
text.

How to solve this problem?

RE: Make a mail with attachment in a windows apllication v-phuang NO[at]SPAM online.microsoft.com (
2/21/2005 3:00:46 AM
Hi

Which class are you using to send the mail?
In dotnet we have a managed class will handle the send mail issue.

Here is a link you may have a try.
How To Send E-mail Programmatically with System.Web.Mail and Visual Basic
..NET
http://support.microsoft.com/?id=314201

Also what is the attachment file type and size are you using.
e.g. Usually *.exe or .vbs file is not valid in the mailattachment and in
some case the attachment larger than certain limitation is also not allowed
which is based on the rule setting on the smtp server.

You may also try with a simple plain text mail with a simple small
compressed file(e.g. zip file) to see if the problem persists.

Also you may try to use the mail client to send the mail with the identity
smtp server setting to see if that works.

You may have a try and let me know the result.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Re: Make a mail with attachment in a windows apllication Ton Mekking
2/21/2005 10:26:14 PM
Thanks for your answer
I used .net 2005 not thinking to try is in 2003

I solved the problem in 2003
(still exist in 2005 but it could be because it is a beta-version)

Ton Mekking

""Peter Huang" [MSFT]" <v-phuang@online.microsoft.com> schreef in bericht
news:VG0hPG8FFHA.3752@TK2MSFTNGXA02.phx.gbl...
[quoted text, click to view]

Re: Make a mail with attachment in a windows apllication v-phuang NO[at]SPAM online.microsoft.com (
2/22/2005 1:59:45 AM
Hi

Since the Whidbey is not released, we have a definitely newsgroup about
Whidbey.

Welcome to the Microsoft Visual Studio 2005 Newsgroups
http://communities.microsoft.com/newsgroups/default.asp?icp=whidbey&slcid=us

For the Whidbey problem, you may try to post in the newsgroup above.

Thanks for your understanding!


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button