Sponsored by
www.aspnetemail.com
|
 |
Discuss This FAQ Item
Got a question? Another Suggestion? Want to post your solution? Discuss it below.
-
Can not use System.Web.*
[ Reply ]
Looks stupid, but I cannot see any classes under System.Web, including System.Web.SmtpMail
Any ideas?
Thanks,J Dot Net
J Dot Net [ jdotnet ( at ) hotmail dot com ],
2004-03-12 00:43:38
#
-
RE: Can not use System.Web.*
[ Reply ]
It actually was stupid .. I forgot to add the reference ..
:)
J Dot Net
J Dot Net [ jdotnet ( at ) hotmail dot com ],
2004-03-12 01:16:24
#
-
RE: Can not use System.Web.*
[ Reply ]
How do I send different sites and my photos?
Karen Pepp [ gracie ( at ) cebridge dot net ],
2005-08-13 11:03:39
#
-
RE: Can not use System.Web.*
[ Reply ]
hi abdullah
abdullah [ atdb1983 ( at ) yahoo dot com ],
2005-12-04 03:09:56
#
-
RE: Can not use System.Web.*
[ Reply ]
system.web.dll needs to be refered into the project
sun [ sun ( at ) hotmail dot com ],
2006-02-05 22:42:07
#
-
RE: Can not use System.Web.*
[ Reply ]
Hi, To see the classes under the namespace, you need to add the reference and then need to import to the file. For adding the reference, go to the project then under reference folder right click and you can find 'Add Reference' option. For importing to the file, use 'using' statement in C# or import statement in VB.NET
Thanks Rakheesh
Rakheesh [ rakheesh ( at ) rediffmail dot com ],
2006-04-13 11:28:27
#
-
RE: Can not use System.Web.*
[ Reply ]
Please help me to configure mailing system in asp.net vb.net platform.....
Anirban [ galaxas ( at ) rediffmail dot com ],
2006-12-01 23:54:49
#
-
cant use web.mail class
[ Reply ]
Still i was not able to use the system.web.mail class, but the documentation provided still does not insist me on any methods or work out procedures how i can use web.mail class, please provide me with solution for this
sekar [ sekharau ( at ) yahoo dot co dot in ],
2005-01-12 23:05:02
#
-
RE: cant use web.mail class
[ Reply ]
Well, I had the same problem. Has soon as I added the reference to "System.Web" and in my class added the "using System.Web;" declaration I could use the System.Web.Mail class. Hope it helps.
Cédric [ virtualbus ( at ) videotron dot ca ],
2005-01-19 07:49:32
#
-
RE RE: cant use web.mail class
[ Reply ]
Check ou this link : http://www.systemwebmail.com/faq/2.aspx.
Cédric [ virtualbus ( at ) videotron dot ca ],
2005-01-19 07:52:40
#
-
RE RE: cant use web.mail class
[ Reply ]
Sorry, I followed your hints but System.Web.Mail doesn't seem to be available for me. My first three lines are:
using System; using System.Web; using System.Web.Mail;
But Mail is underscored in my Vs.net and even if I delete it, I ain't got completion for System.Web
Thanks
Marco Rossi [ swmrossi ( at ) yahoo dot it ],
2005-02-09 03:03:57
#
-
RE: RE RE: cant use web.mail class
[ Reply ]
I fixed it: I remark that System.Web.dll is automacally referenced in ASP.net, in a windows application you have to add a reference to it in Explore Solution ("Esplora Soluzione in Italian").
Marco Rossi [ swmrossi ( at ) yahoo dot it ],
2005-02-09 03:13:09
#
-
RE RE: RE RE: cant use web.mail class
[ Reply ]
Being a beginner in Visual Studio.Net i found i could not add:
Imports System.Web.Mail (i only had system.web)
To reference the System.Web.dll so you can use System.Web.Mail:
1. Select Project 2. Click Add Reference 3. Find System.Web.Dll and add it
You will now be able to use the System.Web.Mail Class!!
Doubt anyone is as silly as me.. but i couldn't find any post like this..
Cheers
Oliver [ oliver dot dunford ( at ) gmail dot com ],
2006-02-08 06:05:03
#
-
RE: RE RE: RE RE: cant use web.mail class
[ Reply ]
I am certainly as silly as you. I was having the same problem (being a newbe as well) and I could not quite put all these pieces together. Your reply made it perfectly clear. - Thank You!
Walt [ wlinsley ( at ) amscan dot com ],
2006-03-29 07:06:11
#
-
RE RE: cant use web.mail class
[ Reply ]
Which language u r using
vb.net or c#.net
For vb.net :- u can declare class
Imports system.web.mail
for C# .Net:- using system.web.mail
Enjoy.... Nayak
Saurabh [ whysaurabh ( at ) yahoo dot com ],
2005-11-28 04:40:16
#
-
Outlook Truncating message body
[ Reply ]
This is the second time I send a draft, after updating it several times and the sent message has lines missing in the body.
Anyone hear of this before?
Diane [ diane dot roy ( at ) filogix dot com ],
2005-06-13 11:54:10
#
-
System.Web.Mail send Mail to Hotmail account
[ Reply ]
Hi,
I'm using System.Web.Mail in C# code. but when I sent a message to hotmail account, this message is not received. With others emails servers its o.k.
can some body help me.
Thanks
This is my code
public string sendMail( string sTo, string sFrom, string sSubject, string sBody, string sAttach, string sCc, string sBcc, string sBodyEncoding, string sBodyFormat, string sMailServer, string sPriority, string sUrlContentBase, string sUrlContentLocation) {
int iLoop1; int i=0; string[] x=null; x = sTo.Split(';'); for (i=0;i<x.Length;i++) { if (IsValidEmail(x[i]) == false) break; } //if (i<x.Length) if(false) { return "Errores en la estructura de la dirección de correo a enviar"; } else { MailMessage MyMail = new MailMessage(); MyMail.From = sFrom; MyMail.To = sTo; MyMail.Subject = sSubject; MyMail.Body = sBody; MyMail.Cc = sCc; MyMail.Bcc = sBcc; MyMail.UrlContentBase = sUrlContentBase; MyMail.UrlContentLocation = sUrlContentLocation;
if (sBodyEncoding == Encoding.UTF7.EncodingName) MyMail.BodyEncoding = Encoding.UTF7; else if (sBodyEncoding == Encoding.UTF8.EncodingName) MyMail.BodyEncoding = Encoding.UTF8; else MyMail.BodyEncoding = Encoding.ASCII;
switch (sBodyFormat.ToUpper()) { case "HTML": MyMail.BodyFormat = MailFormat.Html; break; default: MyMail.BodyFormat = MailFormat.Text; break; } switch (sPriority.ToUpper()) { case "HIGH": MyMail.Priority = MailPriority.High; break; case "LOW": MyMail.Priority = MailPriority.Low; break; default: MyMail.Priority = MailPriority.High;//MailPriority.Normal; break; } // Build an IList of mail attachments. if (sAttach != "") { char[] delim = new char[] {','}; foreach (string sSubstr in sAttach.Split(delim)) { MailAttachment MyAttachment = new MailAttachment(sSubstr); MyMail.Attachments.Add(MyAttachment); } } SmtpMail.SmtpServer = sMailServer; SmtpMail.Send(MyMail); return "Mensage enviado a " + MyMail.To;
} }
Guillermo [ grivas ( at ) soluteka dot com ],
2005-07-14 23:05:14
#
-
Problem in relaying mail from Email server
[ Reply ]
i have problem in relaying mail from my server. the server listens for incoming mails and perform the functionalty as following 1)it will parse the incoming mail.and sapeate to,from,body,subject,date and time 2) it will check the domain of recipient addresses i)if domain is same then it will validate the from address (which will have the same domain of my server) and will insert mail it into the database according to the specified address. ii) if not then it will verify the recipients and get their domains and then it will resolve the domain addresses to get the IP address from of the domain.Then it will relay the mail to the recipients according to their destination email servers .like if address is abc@hotmail.com, abc@yahoo.com it will get the domain name yahoo.com or hotmail.com and it will get the IP from http://www.yahoo.com">http://http://www.yahoo.com. now it will use this IP to relay the mail and the code to relay mail at server side is as following MailMessage mailMsg =
new MailMessage(); mailMsg.From = textBoxFrom.Text;
mailMsg.To = textBoxTo.Text;
mailMsg.Subject = textBoxSubject.Text; mailMsg.Body = textBoxMessage.Text;
mailMsg.BodyFormat = MailFormat.Html;
SmtpMail.SmtpServer = "209.73.186.238"; // this is ip of http://www.yahoo .com
try{ SmtpMail.Send(mailMsg);
}
catch(HttpException ex)
{
textBoxClient.Text+= "\n An Exception Ocurred: "+ex.Message.ToString();
}
now this reports the error "Could not access 'CDO.Message' object." now plz tell me why this happens i have to relay mail from my server and i have to use this code to relay the mail . if there is any other way to relay mail plz tell me coz in this code only problem is on ip address Thanks
Aura [ auroral_aura ( at ) yahoo dot com ],
2006-07-10 05:08:44
#
-
lipu
[ Reply ]
how i use system.web.mail
Debendra [ debendrahandsome ( at ) yahoo dot com ],
2009-12-18 05:09:57
#
|