How to send a url link through web email using C# -URGENT

I have "Email This to A Friend" on my web page, and I want to be able to send my url link to recepient. My problem is, if I put "www.mypage.com" on newMail.body then when recepient receives email from me, they couldn't click it and go to my pages directly... 

I tried to do like this:

public void SendMail (object sender, EventArgs E)
{
MailMessage mailNew = new MailMessage();
mailNew.From = FromText.Text;
mailNew.To = ToText.Text;
mailNew.Subject = "Subject Of the Mail";
mailNew.Body = "<HTML><HEAD></HEAD><BODY><p>
<A HREF=""http://www.moosemountainhottubs.com""></p></BODY></HTML>"; <---THIS
try{
SmtpMail.Send(mailNew);
Response.Write("<scr" + "ipt type=\"text/javascript\">alert('Your email has been sent');</scr" + "ipt>" );
}
catch (Exception exc){
Response.Write("Send failure");
}
ToText.Text="";
FromText.Text="";
}

I Got an error page:
Compiler Error Message: CS1002: ; expected
Source Error:

Line 17:
Line 18: mailNew.Subject = "Subject Of the Mail";
Line 19: mailNew.Body = "<HTML><HEAD></HEAD><BODY><p><A HREF=""http://www.moosemountainhottubs.com""></p></BODY></HTML>";;
Line 20:
Line 21:

Source File: C:\\SendMail.aspx Line: 19
ANYBODY CAN HELP ME?
TIA

0
meme30
6/25/2004 2:20:38 PM
asp.net.getting-started 91979 articles. 3 followers. Follow

1 Replies
1180 Views

Similar Articles

[PageSpeed] 50

close que quotes properly.

mailNew.Body = "<HTML><HEAD></HEAD><BODY><p>
<A HREF=\"http://www.moosemountainhottubs.com\"></p></BODY></HTML>"

Christian Calderon
Need to work in Classic ASP? then do it the right way with CLASP!
Classic ASP Framework
0
ccalderon
6/25/2004 3:54:03 PM
Reply:

Similar Artilces:

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

Sending a url link using System.Web.Mail
In C#, I would like to send a link to a URL out to several employees using System.Web.Mail.Here's how I have it configured:string url = ConfigurationSettings.AppSettings["Path"]; string project = this.ddlProject.SelectedItem.ToString(); MailMessage message = new MailMessage(); message.To = this.EmplEmailAddresses().ToString(); message.From = JohnSmith@myCompany.com; message.Subject = "New project"; message.BodyFormat = MailFormat.Html; message.Body = "The " + project + " project has been created. Please click the following link: " + url; SmtpMail.SmtpServer = "###.###.#.##";The ...

Send email in .net 2.0 using C#
hi can someone please let me how to send emails with attachments in .net 2.0 using C# Some code an explainations in the first few hits ofhttp://www.google.com/search?complete=1&hl=en&q=system.net.mail"If you make it idiot proof, they'll build a better idiot"...

Send Emails using windows services in C# .net
In my c# .net web application, I want to send the mails but at a specific time. I want to use Windows Services ( Application Scheduler)  for that, but i don't know how to proceed. Plz help me, & provide the code. Do you need help with windows services or how to send mail ?  I want to send mails but at a specific time so what should be the code for that?  >I want to use Windows Services ( Application Scheduler)Windows Services and the Application Scheduler are two different ways of achieving much the same thing.  I will assume that you are referring to W...

A problem to send email using Smtp
I have a proble to send an email from asp.net I do the following code to send an email: MailMessage mail=new MailMessage(); mail.From="test@server.com"; mail.To="myemailaddress@server.com"; mail.BodyFormat=MailFormat.Html; mail.Subject="testing..."; mail.Body="cool"; SmtpMail.SmtpServer="localhost"; SmtpMail.Send(mail); But I dont' receive an email when I use this method. Why is that? How can I send an email? Thanks in advance! check and see if.. -your client-side code has no errors -you imported the S...

How to get new web app to use .NET 2.0 on Win2K server using .NET 1.1 as default framework?
I have .net framework1.1 and 2.0 on our server running win2K. i have existing applications that uses asp.net 1.1, i also have a new app that use ASP.net 2.0.  how can i set my new .NET 2.0 app to point to asp.net 2.0 without messing up my existing .NET 1.1 apps? To specify the ASP .Net version fro a web application, do the followingIn IIS Manager select the web application -> Properties -> ASP.Net TabSelect  ASP.Net version you want to use for the applicationRegards,PrashantDont forget to click "Mark as Answer" on the post that helped you. But I am running Win2K...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At http://www.WebLogicArts.com/DemoList.aspx there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo...

Get email address from DB and send email using VB
OK every time I figure something out on my own, there's 10 more things I can't seem to figure out. I feel like a VB moron. Ha. Anyway. Here's what I need to do...1. Retrieve the email addresses from my database table of people whose memberships to my organization has expired in the past month.2. Somehow plug those email addresses into a code to send them a prewritten, preformatted email.I have found an article on how to send an email using VB coding. I just don't know how I would send one email to every person whose membership has expired in the past month. Ideally, I'd like to be able to lo...

how to get the correct email format when sending email using sqldatareader
I'm getting the email address from an excel sheet.But i need to send the email to multiple peopleWhen printing the below i geta@a.com;b@b.com;; But i want a@a.com;b@b.com; i don't need the extra semicolon Thanks code below------ while (oledr.Read()) { smail = oledr[0].ToString() + ";" + "<br>";   //smail += oledr[0].ToString() & ";"; //mail.To.Add(smail); //this.Label1.Text = smail; Response.Write(smail); }   If oledr[0].ToString() contains only one email address (and not a few), then you can do it this way:while (oled...

.Net 2.0 Web application using Vb.net is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one ASP.net web application using Vb.net which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

used a c#.net to vb.net converter and am now getting a syntax error.
ok I used a cool utility at http://www.kamalpatel.net/ConvertCSharp2VB.aspx to convert some c#.net to vb.net and it spit out a bunch of code which almost works but I am getting a syntax error on this line Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) I tried it that way and also like Imports (StreamReader sr = Shadows Function)() As StreamReader(objResponse.GetResponseStream()) but either way gave the same error Compiler Error Message: BC30035: Syntax error. Source Error: Line 26: Line ...

Get email suffix (.net, .org, etc...) from email using Regular Expressions
Does anyone have a code snippet that could do this in VB.NET? I want it to return .net if given bob@microsoft.net Thanks, ScAndal.NET Web Based CRM http://www.kineticcrm.com.NET Consulting http://www.kineticmedia.net Hm. Well, I can get you started, but it won't handle sub-domain e-mails. To make this example easier for me to think about, this regex will look for: someword@someword.some.more.words (Why ".some.more.words"? Because of international country extensions) And it will save the ".some.more.words" part in the Groups property of the Match in in...

C#.NET WEB APPLICATION
hei guys, i need help on my application, i'm using C#.NET as front-ed and SQL as back-end, aside from a datagrid, i want to display my data using textboxes and not a datagrid, i can do it using Visual Basic 6 but since i'm a newbee at C#.NET i don't know how to do it, specially the codes, can anyone help me with it? thank you in advance! If you are doing windows development, i would suggest using 'DataForm wizard' (Use Solution Explorer-->Rightclick project-->Add new Item-->New DataForm). It will guide you through steps. If you are doing web apps. Use quickstart to learn them. h...

How to get HTML Source of web page opened by web browser using vb.net
hello friends,         i have opened an web browser in vb.net using the below code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim nullObject As System.Object = 0 Dim str As String = "" Dim nullObjStr As System.Object = str Windows.Forms.Cursor.Current = Cursors.WaitCursor Dim i As Int16 For i = 1 To 2 AxWebBrowser1.Navigate("http://www.google.co.in/search?hl=en&q=test&meta=", True) AxWebBrowser1.Document. Next Windows.Forms.Cursor.Current = Cursors.Default End Sub  ...

Sending an email using .net
Hi, I am using SMTP Mail object in vb.net to send off an email. Everything works fine most of the times but sporadically it sends the same messsage more than one time. It creates a lot of confusion to the users. I debugged the application and the line "clsMail.Send(clsMailMessage)', where clsMail is an object of SmtpMail and clsMailMessage is an object of MailMessage, runs only once but still my inbox has same email more than once. Please suggest me . Regards, Prerak Are you sure that you are not submiting your page multiple times or refreshing the page?Pandora Tomorrow ...

Web resources about - How to send a url link through web email using C# -URGENT - asp.net.getting-started

‘When Calls The Heart—New Year’s Wish’: Hallmark’s Favorite Couple Returns In 2-Hour Christmas Movie ...
When Calls The Heart is back with a 2-hour ‘New Year’s Wish movie’ special on Saturday December 26 at 8/7 central in anticipation of season 3’s ...

How Not to Beat Ted Cruz
· The GOP establishment will probably learn to love Ted Cruz, a man every Republican in Washington currently hates, when and if they determine ...

Officials Search For Missing People After Deadly Storms Ravage South
NBCNews.com Officials Search For Missing People After Deadly Storms Ravage South NBCNews.com Officials in tornado-ravaged areas were searching ...

Migrants found guilty in brutal killing of British backpackers
New York Post Migrants found guilty in brutal killing of British backpackers New York Post Hannah Witheridge, left, and David Miller, the ...

Hyatt hotels reveal malware discovered in payment systems
Following a series of hotel chains that have recently disclosed the presence of malware in their payment processing systems, Hyatt has come forward ...

Draftkings to ask Illinois court to rule on legality of fantasy sports
(Reuters) - Fantasy sports company DraftKings will ask a court to decide the question of whether it can offer daily fantasy sports games in Illinois, ...

Lunch Lady Fired for Good Deed Offered Job Back
An Idaho lunch lady who said she was fired for giving a free meal to a student in need is now being offered her job back, according to the school ...

Reasons British Muslim Family Was Barred From US Entry, Disneyland: Facebook Page Linked To Taliban ...
Mohammad Tariq Mahmood made headlines when he claimed that his British Muslim family was barred from entry into the United States “because he ...

Planned Parenthood shooter wants to act as own lawyer
Washington Post Planned Parenthood shooter wants to act as own lawyer Charlotte Observer El Paso County District Attorney Dan May, center, ...

What Beatles Songs are the 2016 Presidential Candidates Streaming?
English rock group The Beatles gifted the streaming world with the greatest early Christmas present imaginable — access to their entire catalog. ...

Resources last updated: 12/24/2015 6:34:00 PM