R8VI
asked on
c# sending email
Hi,
I am sending an email VIA c# in a string format like
body = "the email made up with html"
In here I have a link like so
http://thes.com/x.aspx?CompanyId=1&ImageID=1&EmailID=2\
But instead of hard coding the values for CompanyId, ImageID, and EmailID I want to pass the variables
sCompanyID, sImageID, sEmailID
Please help
Thanks
R8VI
I am sending an email VIA c# in a string format like
body = "the email made up with html"
In here I have a link like so
http://thes.com/x.aspx?CompanyId=1&ImageID=1&EmailID=2\
But instead of hard coding the values for CompanyId, ImageID, and EmailID I want to pass the variables
sCompanyID, sImageID, sEmailID
Please help
Thanks
R8VI
ASKER
Hi
Thanks for this, the question is not about sending emails sorry its about how do I append the variables to the HTML string
Thanks for this, the question is not about sending emails sorry its about how do I append the variables to the HTML string
C#
string companyID = "1";
string ImageID = "1";
string EmailsID = "2";
string urlString = "http://thes.com/x.aspx?" + companyID + ImageID + EmailID + "\\";
VB
Dim companyID as string = "1"
Dim ImageID as string = "1"
Dim EmailsID as string = "2"
Dim urlString as string = "http://thes.com/x.aspx?" & CompanyId & ImageID & EmailID & "\"
string companyID = "1";
string ImageID = "1";
string EmailsID = "2";
string urlString = "http://thes.com/x.aspx?" + companyID + ImageID + EmailID + "\\";
VB
Dim companyID as string = "1"
Dim ImageID as string = "1"
Dim EmailsID as string = "2"
Dim urlString as string = "http://thes.com/x.aspx?" & CompanyId & ImageID & EmailID & "\"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try the below code
C#
string companyID = "1";
string ImageID = "1";
string EmailsID = "2";
string url="http://thes.com/x.aspx?companyID="+companyID+"&ImageID ="+ImageID +"&EmailID ="+EmailsI D+"\"
VB
Dim companyID as string = "1"
Dim ImageID as string = "1"
Dim EmailsID as string = "2"
Dim url as string = "http://thes.com/x.aspx?companyID="&CompanyId&"&ImageID="&I mageID&"&E mailID="Em ailID& "\" .
hope this helps.
C#
string companyID = "1";
string ImageID = "1";
string EmailsID = "2";
string url="http://thes.com/x.aspx?companyID="+companyID+"&ImageID
VB
Dim companyID as string = "1"
Dim ImageID as string = "1"
Dim EmailsID as string = "2"
Dim url as string = "http://thes.com/x.aspx?companyID="&CompanyId&"&ImageID="&I
hope this helps.
I would prefer ID 39533782 as best answer.
Please check these articles and you will get clear idea.
How to send email from C# :
http://emailarchitect.net/easendmail/kb/csharp.aspx
http://archive.msdn.microsoft.com/sendemail
Sending email from ASP.Net 4 – C# sample code:
http://bradkingsley.com/sending-email-from-asp-net-4-c-sample-code/
http://csharp.net-informations.com/communications/csharp-html-email.htm
How to send email in asp.net or C# :
http://aspdotnet.hotinit.com/2012/05/how-to-send-email-in-aspnet-or-c.html
C# Code snippet to send an Email with attachment from Outlook, Yahoo, HotMail, AOL and Gmail:
http://www.codeproject.com/Tips/165548/C-Code-snippet-to-send-an-Email-with-attachment-fr
Send Email Messages and Attachments Using C#:
http://www.c-sharpcorner.com/uploadfile/scottlysle/send-email-messages-and-attachments-using-C-Sharp/