473,387 Members | 1,545 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.

"Invalid mail attachment" error from server only

GD
Hi,
An intranet application, with a SMTP mail function that lets users to attach
files with emails by selecting files in their local computers (through a
file browser component), works perfect on my local machine. However, after
deployment to a server that has Windows 2003 Sever installed, the mail
function is able to attach the file created by the application. However,
when users attach some files selected from their local machines, it
generates an error:
Exception Details: System.Web.HttpException: Invalid mail attachment
'C:\test.txt'.

It could be some security reasons even I set the full control permissions to
the attached files.

Any ideas or solutions?

TIA.

GD

Nov 18 '05 #1
2 4410
You need to have the file uploaded from the client machine to the server
before the server can attach it to the mail message. It is working for
you locally because the files are already there. "c:\test.txt" exists on
both the client (your machine) and the server (your machine).

Tasks to do:
User selects files to email and submits form
Web form uploads selected files to server (search for uploading files in
ASP.NET)
Web Form saves uploaded files to a temp directory (don't forget ASPNET
write permissions)
Web form creates email and attaches files saved in temp directory to mail
message
Web form Delivers email message with attachments
Web Form cleans up temp directory

Probably not what you were expecting.

Best of luck!
"GD" <g_**@comcast.net> wrote in
news:uE**************@TK2MSFTNGP10.phx.gbl:
Hi,
An intranet application, with a SMTP mail function that lets users to
attach files with emails by selecting files in their local computers
(through a file browser component), works perfect on my local machine.
However, after deployment to a server that has Windows 2003 Sever
installed, the mail function is able to attach the file created by the
application. However, when users attach some files selected from their
local machines, it generates an error:
Exception Details: System.Web.HttpException: Invalid mail attachment
'C:\test.txt'.

It could be some security reasons even I set the full control
permissions to the attached files.

Any ideas or solutions?

TIA.

GD


Nov 18 '05 #2
GD
After uploading files, the attachment function works.
Thanks very much.

"cbDevelopment" <de*********@remove.700cb.net> wrote in message
news:Xn***************************@207.46.248.16.. .
You need to have the file uploaded from the client machine to the server
before the server can attach it to the mail message. It is working for
you locally because the files are already there. "c:\test.txt" exists on
both the client (your machine) and the server (your machine).

Tasks to do:
User selects files to email and submits form
Web form uploads selected files to server (search for uploading files in
ASP.NET)
Web Form saves uploaded files to a temp directory (don't forget ASPNET
write permissions)
Web form creates email and attaches files saved in temp directory to mail
message
Web form Delivers email message with attachments
Web Form cleans up temp directory

Probably not what you were expecting.

Best of luck!
"GD" <g_**@comcast.net> wrote in
news:uE**************@TK2MSFTNGP10.phx.gbl:
Hi,
An intranet application, with a SMTP mail function that lets users to
attach files with emails by selecting files in their local computers
(through a file browser component), works perfect on my local machine.
However, after deployment to a server that has Windows 2003 Sever
installed, the mail function is able to attach the file created by the
application. However, when users attach some files selected from their
local machines, it generates an error:
Exception Details: System.Web.HttpException: Invalid mail attachment
'C:\test.txt'.

It could be some security reasons even I set the full control
permissions to the attached files.

Any ideas or solutions?

TIA.

GD

Nov 18 '05 #3

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

Similar topics

4
by: manatlan | last post by:
In an intranet/lan, i'd like to put a "python server script" (which run forever) on a computer A... On another computer B, I'd like to send smtp-email to the computer A ... (send to...
0
by: Brian Morris | last post by:
I'm new to .NET and just trying a few things out, like emailing. I created a form in Visual Studio .Net to input some information for generating an email and I'm getting the following error when it...
2
by: Vinod I | last post by:
Hi Team, When I tryed following code, I am getting the Runtime Error as "The View State is invalid for this page and might be corrupted." Exception Details: System.Web.HttpException: The View...
8
by: lawrence k | last post by:
I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying to install PHP 5.1.4. I can not get the ./configure command to work. I keep getting this error: configure: error: Invalid...
4
by: Screaming Eagles 101 | last post by:
How can I make my own Mail control (unvisible one) to use with a form ? Does anyone know where to find code ? I would like to fill in some parameters, and then send a mail, a bit like this : ...
6
by: Kurda Yon | last post by:
Hi everybody, I have a problem with the function "mail". It returns "true" but supposed recipients receive nothing. My code is as follows: $to = $form; $subject = "E-mail Verification";...
2
by: Bill_DBA | last post by:
I have the following stored procedure that is called from the source of a transformation in a DTS package. The first parameter turns on PRINT debug messages. The second, when equals 1, turns on the...
0
by: yunusb2k | last post by:
Dear All, plese help me , i using ASPMAIL script for sending mail for my webiste but from last 2 month my script not working properl;y and send mail to only same host domain like i have 2 site...
0
by: Danigan | last post by:
Is there a way I can set up Apache to put incoming emails into a folder as individual text files (MIME, text, or I guess it'd be cool if Apache has a module to throw it into a database like mySQL...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.