0

hey guys...this is ma code which i used in ma application.i tried different kind of codes,but i got da same error unfortunately.i'm using my university network,which has restricted proxy sever.So is this because of the proxy server restrictions,if so tell me how to over come this please..thanx

System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();

            System.Net.NetworkCredential cred = new System.Net.NetworkCredential("from@gmail.com", "fromPassword");

            mail.To.Add("toMail@yahoo.com");
            mail.Subject = "subject";

            mail.From = new System.Net.Mail.MailAddress("fromMail@gmail.com");
            mail.IsBodyHtml = true;
            mail.Body = "message";

            System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com");
            smtp.UseDefaultCredentials = false;
            smtp.EnableSsl = true;
            smtp.Credentials = cred;
            smtp.Port = 587;
            smtp.Send(mail)

Edited by __avd: Added [code] tags. Encase your code in: [code] and [/code] tags.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by reach_shailshar
0

hello!!!
Outlook is one of the most efficiently mailing tool used in intranet sections...
so u can configure your outlook & can use the following code in your html part to use outlook through your web page.


code:-

<a href="mailto:abc@xyz.com?">

       <asp:literal id="mailTo_Text" runat="server" Text="Send me an email" runat="server" />

</a>

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.