IIS and SMTP - Re: SmtpMail from aspx.cs Cant send Message - Gives error

This is Interesting: Free IT Magazines  
Home > Archive > IIS and SMTP > July 2004 > Re: SmtpMail from aspx.cs Cant send Message - Gives error





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: SmtpMail from aspx.cs Cant send Message - Gives error
Kristofer Gafvert

2004-07-04, 5:51 pm

Hello,

Try to add this above Send():

SmtpMail.SmtpServer = "localhost";

(i assume that you want to send using localhost)

--
Regards,
Kristofer Gafvert - IIS MVP
http://www.ilopia.com - When you need help!


"SibAndela" <SibAndela@discussions.microsoft.com> wrote in message
news:42200BBD-BE0F-4C58-82E2-6C0FF5B326A0@microsoft.com...
> I want to send an email from the serverside of an aspx page based on data

submitted by the client. I also need to attach a file to send to the
recipient of the email.
>
> Testing inWindows XP/ Visual Studio .Net:
> Uploading the file and saving it - no problem
> Creating and populating the MailMessage - no problem
> Attaching the file to Mail Message - No Problem
>
> SmtpMail.Send(oMM) -gives following exception.
>
> Exception Details: System.Runtime.InteropServices.COMException: The

"SendUsing" configuration value is invalid.
>
> Source Error:
>
> Line 35: oMM.Attachments.Add(oMA);
> Line 36:
> Line 37: SmtpMail.Send( oMM ); <-- error line
> Line 38: }
> Line 39:
>
> Same code in windows app in works.
> How do I correct this problem.
>
> Thanks
>
> Sib Andela
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com