Problem sending mail with System.Web.Mail

Hello helpful

Om trying to get the System.Web.Mail working..
I have two servers, one execute my code very nice and sends all the mail a want... but the other one is not that nice... its gives me the following error msg in the stack trace..

"[COMException (0x80029c4a): Error loading type library/DLL.]"
I have tried set the aspnet account to full rights to the the /winnt/ path..
I'v used the same installation for both servers... any suggestion how to fix this?
/magnus
0
sannerud
10/3/2002 7:59:21 AM
asp.net.getting-started 91979 articles. 4 followers. Follow

4 Replies
932 Views

Similar Articles

[PageSpeed] 30

Can you verify the SMTP Service is installed on both servers?

Thanks,
Dave


Dave
Some of my websites
aspNetEmail.com
SystemNetMail.com
SystemWebMail.com
0
AdvanIntel
10/3/2002 11:38:47 AM
Yes it verified...

I have tried to fiddle with the settings and got it to work, If I give the aspnet account admin rights, But that’s not a good idea... so I have tried to set up a new aspnet user and set all the rights manually with som help from:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q317012
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q315158
but I don’t get it to work with my new aspnet account…
so is there any documentation on with rights the aspnet user should have?

/sannerud
0
sannerud
10/8/2002 8:03:40 AM
Hi,

Were you able to fix this issue? I am also having a similar problem:
http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=422633
Thanks,
Suresh
0
skdrajan
12/18/2003 10:59:10 PM

System.Web.Mail is obsolete since .NET 2.0

Try using System.Net.Mail

http://www.systemnetmail.com/

 

 


Dev
0
devcalpoly
5/14/2008 9:51:49 PM
Reply:

Similar Artilces:

Problem with difference between System.Web.Mail and System.Net.Mail in using attachments
I have a web .Net app which sends emails with attachments.  After the email is sent I clean up aftermyself and delete the attachments from disk.   In upgrading to .Net 2  I changed the email logic from using system.web.mail to system.net.mail  (of course vs is telling me system.web.mail is obsolete).In .Net 1.1,  the files deleted with no problem but in .Net 2 when I attempt to delete  I receive The process cannot access the file ...' because it is being used by another process. If I change the code back to using system.web.mail I can delete the files.  So it would appear that something about the mail object, using system.net.mail,  keeps the file in use.  I found the same is true if I attempt to overwrite the files using something like File.Copy(from,to, true).   Why in .Net 2  would the disk files still be in use...or at least how can they be released?Below is snip of code, both the 1.1 and 2.0 version. .Net 1.1   code============================        Dim mailObj As New System.Web.Mail.MailMessage()        With mailObj            .From = fromName            .To = toName            .Body = body.ToString         &nb...

What additional advantage we get through System.net.mail over the old system.web.mail?
What additional advantage we get through System.net.mail over the old system.web.mail?Is it needed to configure the smtp server? Plz tell me the steps to develop the email sending facility in our applicationSwati Jain Take a look at www.systemnetmail.com.JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue....

Problem in sending mail using system.net.mail
I am using C# and ASP.Net2.0 for sending mail. But my problem is it is not being sent. I am not being able to understand it. I am using my gmail account for it. I am using System.Net and System .Net.Mail for sending the same. But i am getting the error ''Failure Sending Mail. Cannot connect to the server" . I have internet connection. Plz help me. It's urgent. I am attaching my code.  MailMessage mailMsg = new MailMessage();MailAddress ma = new MailAddress(username@gmail.com); mailMsg.From = ma; mailMsg.To.Add(s);mailMsg.Subject = "Your way2k.com account password information"; mailMsg.IsBodyHtml = true;mailMsg.Body = "Your Account Information: \n\t\t UserName/Email: " + TxtBxEmail.Text.Trim() +"\n\t\t Password:" + ds.Tables["UserPassword"].Rows[0].ItemArray[0].ToString().Trim();   mailMsg.Priority = MailPriority.High; SmtpClient smtpclnt = new SmtpClient();smtpclnt.Host = "smtp.gmail.com"; NetworkCredential nc = new NetworkCredential("username", "password"); //smtpclnt.Port = 25;smtpclnt.UseDefaultCredentials = false; smtpclnt.Credentials = nc;smtpclnt.EnableSsl = false; smtpclnt.Send(mailMsg); flag = 1;Web DeveloperPune,India  hi smartymca,follow this link for yr anwser...1 .http://ramanisandeep.wordpress.com/2008/10/07/send-email-in-aspnet-20/2. http://dotnetguts.blogspot.com/2006/10/send-email-from-gmail-in-aspnet-20.html3. ht...

System.web.mail to System.net.mail
I converted a asp.net web app from VS 2003 to VS 2005. i now get error message when i build it  stating system.web.mail  is obsolute,  use system.net.mail i redefine to system.net.mail but now i get other error message such as smtpMail does not exist in the current context. cannot implicitly convert type string to System.Net.Mail.MailAddress   so System.Web.Mail want work in ASP.net web app convert to VS 2005 running on framework 2.0?           because if i change to System.Net.Mail  i am ...

Why do Sending SMTP Authenticated E-mail succeed using SmtpMail.Send() function but fail using SmtpClient.send() function ? Bugs in System.Net.Mail.SmtpClient when send a Authenticated E-mail?
I click btnOK button, the email can send OK, but click btnFail button,  the following error is displayed! why ? you can test the section code. The SMTP, username, password are valid!  Many thanks! "Syntax error, command unrecognized. The server response was: authentication failed,decode user password error" I have tested some other SMTP, somes is OK. I think there are some bugs with System.Net.Mail.SmtpClient when send a Authenticated E-mail with some SMTP!   //------------------------------------------.ASPX Code------------------------------------------------<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server">    <title>Untitled Page</title></head><body>    <form id="form1" runat="server">    <div>        <asp:Button ID="btnOK" runat="server" OnClick="btnOK_Click" Text="Send Email OK" />        <asp:Button ID="btnFail" runat="server" OnClick="btnFail_Click&...

Help for Visual web dev isolate system.web.mail to system.net.mail
Hi all,  I'm new user to visual web developer express software. Laterly i found this application isolate quite some of the component namespace, like system.web.mail to net.mail. I not well understand how system.net.mail functional?? Does it act same as system.web.mail?? My coding below: change system.web.mail to system.net.mail which causing a lot error... *****Can anybody correct me or advise me how to make this code work in system.net.mail?????? <%@import Namespace="System.net.Mail" %> <script runat="server">    Public FromAddress As String = "" .......

difference between System.Web.Mail and System.Net.Mail
What is difference between System.Web.Mail and System.Net.Mail  namespace?What is use of both ? System.Web.Mail was in .NET Framework v1.1System.Net.Mail is in .NET Framework v2.0 and greaterSame use, although there is more functionality in System.Net.Mail since it is a later version of the framework. Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you!  What All-Star said. I assume the reason it was moved to a different namespace is because the internet is actually a suite of technologies: e-mail, ftp, http (web), etc. E-mail and...

Working with System.Web.Mail but not with System.Net.Mail
Hi, i am having trouble sending e-mails using System.Net.Mail namespace while there is no problem with System.Web.Mail. I am  using remote smtp server with no authentication.  My code as shown below:1 try2 {3 MailMessage message = new MailMessage();4 message.BodyFormat = MailFormat.Html;5 message.To = "admin@mydomain.com";6 message.From = "test@mydomain.com";7 message.Subject = "Test Smtp";8 message.Body = "TestMail 123";9 10 SmtpMail.SmtpServer = "mail.mysmt...

System.Web.Mail vs System.Net.Mail
Hi AllI was using System.Web.Mail in an application on our test server.  That worked fine.  I never had to specify a server or change any settings.  It just works.  Whatever settings the server has set up are used.  This is great.I saw that System.Web.Mail has been deprecated, so I'm trying to use System.Net.Mail.  I'm having a problem.  Net.Mail doesn't use whatever settings Web.Mail used.  I can't send e-mail with Net.Mail.  I see several people use the web.config file to set the server up, but I can't get that to work. I jus...

switching from system.web.mail to system.net.mail
I have been converting my code from system.web.mail to system.net.mail.  I have been able to convert the to, from, cc, and message body to the new format easily but...my question is how do i convert this into system.net.mail format?SmtpMail.SmtpServer = "server";                SmtpMail.Send(mail);Would this be the solution?SmtpClient client = new SmtpClient("server");                client.Send(mail); Here's a full example of how to per...

Migrating from System.web.mail to System.net.mail
Hi Every1,I've recently used the System.web.mail to send mail, using the IIS's smtp server.Doing this, i didn't really need to do anything in the web.config file or give any special parameters to the client. It just assumed i was working with my very own smtp service that came with the IIS and everything worked fine.Now i migrated to System.net.mail and now i need to insert my smtp service's host location under <system.net> in the web.config file.However, i don't know what to write there so the client will use my smtp sevice (host="localhost" doesn't work)can any1 help me on this one?t...

Changing System.Web.Mail to System.Net.Mail
I am trying to learn ASPI have been using the Visual Web Developer 2005I have the following line that I can not work out how to convert.<%Dim FromForm As String = "Mail@Myname.co.uk"Dim ToMe As String = "Me@myname.co.uk"Dim FormSubject As String = "Contact Infomation"Dim EmailText As String = "Blar Blar Blar"System.Web.Mail.SmtpMail.Send(FromForm,ToMe,FormSubject,EmailText)%>It tells me that I cannot use System.Web.Mail any more and should use System.Net.Mail. I have been unable to work out what the new code should be to get it to work.The Language is VBCan anyone tell me how to change...

Converting from System.Web.Mail to System.Net.Mail
Hi there, I'm from Argentina. I've converted System.Web.Mail (code is underlined) to System.Net.Mail (code is Bold) . I'd like to know if it's correct. Thanks !!public uint enviar()        {            try            {                // Abrir el archivo que contiene el template del HTML.                // Envia el mail con el HTML.                MailMessage Message = new MailMessage();                //Message.From = CShared.devolverValorConfig("em.remitente");                Message.From = new System.Net.Mail.MailAddress CShared.devolverValorConfig("em.remitente"));                //Message.To = string.Join(";", destinatarios);                Message.To.Add (string.Join(";", destinatarios));                if (this.enviarSinFormato == false)    ...

Sending mail through System.Web.Mail
Hi guys, long time no talk :) Ok, here's a question. I'm making a newsletter that will be sent to people on a mailing list. The System.Web.Mail object is helpful for this but I need to know one thing. I want to send the newsletter in a way that, when the recipient receives it, the "From" reads "Bensaude Turísmo" and not "geral@bensaude.pt". In other words, I want to be able to imitate the "Name <Email>" way of sending email, but I haven't found out how to do that with System.Web.Mail. Up until now, I keep getting a parse error ...

system.net.mail not sending out mail
I recently upgraded from a 2.0 framework to 3.5 using c#.  When I upgraded, I needed to change the way I was using MailMessage.  But now for some reason it doesn't work.  Am I missing something?Below is my code:using System.net.Mail; MailMessage msg = new MailMessage();msg.To.Add(toList);msg.CC.Add(ccList = null ? "" : ccList);msg.From = new MailAddress(fromList);msg.Subject = subject;msg.Body = body;msg.IsBodyHTML = true; SmtpClient smtp = new SmtpClient(smtpServer);smtp.Send(msg); I'm passing all the value from my web.config file inside AppSettings.What ...

.net 2 beta 2 - System.Net.Mail
Hi guysI'm using the System.Net.Mail namespace in .net version 2, beta 2, to send out some HTML formatted e-mails.However, for some reason when the e-mail are sent out some of the full stops from the e-mail are removed.For example, part of the e-mail contains this code<img src="http://www.avonandsomerset.police.uk/images/grey_box_bottom.gif" alt="">But this is what the code is like when the e-mail source code is viewed<img src="http://www.avonandsomerset.police.uk/images/grey_box_bottomgif" alt="">Is this a known bug in beta 2? If so, where can I view a list of known bugs an...

get mail using System.Net.Mail
How can i get Email usign System.Net.Mail ?? Hello poloxy  ,the System.Net.Mail used only for sending emails and not to receive them.Read the full documentation at  MSDN Library http://technet.microsoft.com/en-us/library/system.net.mail.aspx  Hosam Kamel Remember to click on Mark as answer on the post that helped you SO how can I receive mail ? Try one of these pop3 librarieshttp://www.codeproject.com/info/search.aspx?artkw=pop3  Hosam Kamel Remember to click on Mark as answer on the post that helped you HI,   if you want to send email by using System....

Sending mail using System.Web.Mail
Hi, This is the first time I've sent mail using this method and I'm having a mental block, the code below works fine but for my email body I want to include the text from more than 1 form field. How do I get the page to do this? <script language=C# runat=server> void btnSubmit_Click(Object sender, EventArgs e) { string sTo, sFrom, sSubject, sBody; string sBodyEncoding, sBodyFormat, sMailServer; int iLoop1; sTo = "toaddress"; sFrom = "fromaddress"; sSubject = "subject"; sBody = Request.Form["formfield"]; sMailServer = "localhost"; MailMessage MyMail = new MailMessage(); MyMail.From = sFrom; MyMail.To = sTo; MyMail.Subject = sSubject; MyMail.Body = sBody; SmtpMail.SmtpServer = sMailServer; SmtpMail.Send(MyMail); lblMsg1.Text="C# Message sent to " + MyMail.To; } </script> Just build up a string of everything you want in the body: sBody = "Field1: " + Request.Form["formfield1"] + "\r\n" + "Field2: " + Request.Form["formfield2"] + "\r\n" + "Field3: " + Request.Form["formfield3"] + "\r\n"; etc. C# / C++ Developer Also, you may want to check out the StringBuilder class which uses the System.Text namespace. Thanks...

Sending Mail Using SYSTEM.WEB.MAIL...
Hello: I have been experiencing a very strange problem that was not there before in the past. When I use the system.web.mail class to send e-mail... most of the messages trying to be sent result in an error while some go through very strange... In my code I specify a valid remote mail server, a valid to and from e-mail addresses on the same domain... Some of the e-mails go through some do not... here is the error below from the e-mails that do not go through... Send failure: System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetIn...

Sending Email through System.Net.Mail is generating errors "Failure Sending mail
hi Sending Email through System.Web.Mail is working fine but System.Net.Mail is generating errors "Failure Sending mail  i treid in all possible ways but did't  pls help in giving a solution thanks & Regards vittal Maybe you can show us some code and post the exact error mesg as well (by looking at the value in ex.tostring)?My HomePage - www.findingsteve.net"It is more blessed to give than to receive." Acts 20: 35 (NIV, Bible)Progress - "Never discourage anyone...who continually makes progress, no matter how slow." Plato System.Web.Ma...

Sending Generic e-mail with System.net.mail
OK. This community is full of very smart and wonderful folks who have helped me out a lot. Here is another head scratcher for me. First off, here is my attached code in question. using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Collections.Generic;using System.Text;using System.Net.Mail;namespace dialogcoachdotcom{    public partial class contactus : System.We...

System.Net.Mail.SmtpException: Failure sending mail
Hi, I written the code in .aspx.cs mail send button click event  and i import name space using System.Net.Mail;  String strSubject = "Subject of the mail”;String strMailbody="Body of the mai"; Try{MailMessage Message = new MailMessage();Message.To.Add(new MailAddress("xxxx@domain.com"));Message.From = new MailAddress("xxxx@domain.com"); Message.CC.Add(new MailAddress("xxxx@domain.com"));Message.CC.Add(new MailAddress("xxxx@domain.com")); Message.Subject = strClaimSubject;Message.Body = strClaimMailbody;Messag...

System.Net.Mail.SmtpException: Failure sending mail
 Hi All,i am sorry if i posted this in wrong forum. but i am stuck have no idea why i keep getting this error . i have mail server with my hosting company. its called mail.mysite.com ( mysite is my domain name. i do have the real domain name even thou i am displaying here). when a customer places a order online, he/she gets an order confirmation email saying that the order has been placed along with their confirmation number. now thats where the error is coming and displays the customer an custom error page to go back and try again. if they do , it finally gives them the order confirmation number after mail server started working again. as a result, its frustrating the customers and me too LOL.here is the error  System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host     at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)     at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)     --- End of inner exception stack trace ---     at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)     at System.Net.DelegatedStre...

System.Web.Mail send Mail to Hotmail account
 hello i have a form in which  user enter his mail id and then we send some information on his mail id.his mail id used in Bcc. and for FROM and TO i used my domain mail id.this code works when i entered mailid of  gmail.com or in.com  but  when i am trying to send mail to other account such as hotmail,yahoo,rediffmail its not working. can some body help me.ThanksThis is my code ----------------------------------------- Public Function fncSendOdrEmail(ByVal strBody As String, ByVal strSubject As String, ByVal strToAddress As String, ByVal bccAddress As Stri...

Web resources about - Problem sending mail with System.Web.Mail - asp.net.getting-started

Problem novel - Wikipedia, the free encyclopedia
Working class, or proletarian novels are often also social problem novels . This was in many ways a reaction to rapid industrialization , and ...

Maria Sharapova's meldonium problem: it's about the brains, not the looks
What Maria Sharapova seems most guilty of is breathtaking stupidity.

Peak problems
Rob Haugh, Operations Manager, Able Liquid Waste in Clyde, is finding the peak traffic difficult for business.

Florida’s problem with sea level rise catches up with Rubio at debate
... debate near Miami, Florida. (credit: Joe Raedle / Getty Images) Earlier this year, a group of Florida mayors that are dealing with problems ...

How to fix Microsoft Edge's worst problems
... soon (and to the rest of us when the Redstone update for Windows 10 rolls out in June/July). If you’re using the new browser and having problems, ...

One simple solution to dozens of problems you might be having with your iPhone
Not every iPhone update is a winner. Sometimes apps don't work correctly, the battery life takes or a whole host of other issues might arise. ...

Where underwater homes are still a big problem
Where underwater homes are still a big problem

How to spot problem charities
Problems at the Wounded Warrior Project charity highlight the need to vet your charity. Here's how to find the best ones.

How to use Apple Diagnostics to identify Mac hardware problems
... pretty reliable, but when they do go wrong the Apple Diagnostics tool should help you figure out if you have a software or a hardware problem, ...

The 5 Big Problems That Hurt Marco Rubio In 2016
It’s looking increasingly like is in real danger of an embarrassing primary loss in his home state of Florida on Tuesday. The press seems to ...

Resources last updated: 3/11/2016 9:38:12 PM