Sending a link through email

BUYCHAMPIX

New Member
In C# ASP.net URL Link sending in email. By clicking the link in gmail file will get download only in local machines. Its not getting download in remote machines.Here is My Code:\[code\] protected void btnSendMultipleMail_Click(object sender, ImageClickEventArgs e) { string url=""; string docfile = ""; ArrayList al = new ArrayList(); for (int i = 0; i < lstUpload.Items.Count; i++) { url += "http://" + Request.Url.Authority +Request.ApplicationPath + "/Enclosure/" + lstUpload.Items.Text + "<br/>"; // al.Add(url); } /* for (int i = 0; i < lstUpload.Items.Count; i++) { string fileName = Server.MapPath("~/Enclosure/") + lstUpload.Items.Text; al.Add(fileName); }*/ if (txtfile.Text != "") { docfile = Server.MapPath("~/Templates/") + txtfile.Text; } string success = mail.SendMultipleEmailAttachment("[email protected]", txtMail.Text, txtCC.Text, "Final Specification:please Click the Below link",url,txtfile.Text,al); if (success == "1") { ScriptManager.RegisterStartupScript(this, typeof(string), "openNewWindow", "<script>alert('Email Sent Successfully')</script>", false); if (lstUpload.Items.Count > 0) { for (int i = 0; i < lstUpload.Items.Count; i++) { SqlCommand cmd = new SqlCommand("spInsertTblEnclosureFiles"); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@colname", SqlDbType.VarChar).Value = "http://stackoverflow.com/questions/15900848/finalspecno"; cmd.Parameters.Add("no", SqlDbType.Int).Value = http://stackoverflow.com/questions/15900848/ddlfinalspec.SelectedValue; cmd.Parameters.Add("@companyid", SqlDbType.Int).Value = http://stackoverflow.com/questions/15900848/Convert.ToInt16(Session["companyid"]); cmd.Parameters.Add("filename", SqlDbType.VarChar).Value = http://stackoverflow.com/questions/15900848/lstUpload.Items.Text; int stchng = ems.Execute_Sql(cmd, con); } } } else if (success =="0") { string str = "Email Not Send Successfully"; lblMsg.Text = str; } BindEnclosureFiles(); }\[/code\]
 
Top