Send email message with attachments

  • Thread starter Thread starter Aleksei Pashin
  • Start date Start date
A

Aleksei Pashin

Hi
I am trying to send email message from my ASP.NET page using MailMessage É
SmtpMail.
Message must have the attachment file.
When its size grows 150K I get an error message

System.Runtime.InteropServices.COMException: Unspecified error

TargetInvocationException: Exception has been thrown by the target of an
invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[] modifiers,
CultureInfo culture, String[] namedParameters) +473
System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
methodName, Object[] args) +58


Could you help me to solve this problem.
Thank you
 
Thank you for your reply.
I could successfully send email message from ASP.NET script with attachment.
Message with attachment up to 150K has been sent successfully.
 
Is it possible that the SMTP server has a size limit on the emails being
sent from there? Can you check the size limit on your SMTP server..
If you run your own IIS Server, check the following:

- Goto IIS Manager
- right-click on "Default SMTP Virtual Server"
- Go to properties/ Messages tab
- Check the "Limit Message Size to" value.
 
Back
Top