Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
Unable to send arguments to winform exe on click of hyperlin
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Lakshmi Priyank Buddiga
11y
1.4k
1
Reply
trying to pass parameter to Winform exe on click of Hyperlink from email.
Please find the code below to send mail having Hyperlink to open winform exe
var smtpMessage = new MailMessage();
bool isSuccess = false;
int retryCount = 0;
smtpMessage.Subject = "helloooo";
smtpMessage.From = new MailAddress("
[email protected]
");
StringBuilder s = new StringBuilder();
string test ="<a href=C:\\WindowsFormsApplication1\\WindowsFormsApplication1\\bin\\Debug\\WindowsFormsApplication1.exe" + " test>" + "Click</a>";
string subscriber= "
[email protected]
";
smtpMessage.To.Add(new MailAddress(subscriber));
smtpMessage.Body = s.ToString();
while (retryCount < 3)
{
var client = new SmtpClient();
try
{
client.Send(smtpMessage);
retryCount = 3;
isSuccess = true;
}
catch (Exception ex)
{
throw;
}
}
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Exception handleing
variable error, need help please