Hello
In the following SMTP code, have I coded myMessage.Body correctly, please? - myMessage.From = New MailAddress("info@mysite.net") 'Webmaster's email
-
myMessage.To.Add(New MailAddress(strEmailValue)) 'user's email
-
myMessage.Subject = ("Password Reset Request")
-
-
'myMessage.Body = "Please click on the following link to reset your password: <br/>Link<br/><br/>Thank you<br/>"
-
-
myMessage.Body = "" myMessage.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure
-
myMessage.IsBodyHtml = True
-
myMessage.Priority = MailPriority.Normal
-
-
Dim PlainMessage As AlternateView = AlternateView.CreateAlternateViewFromString("Hello. To reset your password, please click on this link", Nothing, "text/plain")
-
-
Dim mimeType As ContentType = New ContentType("text/html")
-
-
Dim HtmlMessage As AlternateView = AlternateView.CreateAlternateViewFromString("<img src=cid:dimaHeader><br /><br /><br ><body style='font-family:candara; color:#ffffff; background-color:#858585; margin-left:2em;'>Hello " & strEmailValue & "<br /><br /> To reset your password, please click on this <a href='http://www.dimadayoub.net/newPassword.aspx?token=" & uniqueCode & "' style='color: #0000FF; text-decoration: none;'>link</a><br /><br />Thank you<br /><br />Regards<br /></br />Dima<br /><br ><a href='http://www.dimadayoub.net' target='_blank' style='color: #0000FF; text-decoration: none;'>http://www.dimadayoub.net</a></body>", Nothing, "text/html")
I have commented out: - 'myMessage.Body = "Please click on the following link...
and set this to nothing
because I have included the body and link instead in the following two lines: - Dim PlainMessage As AlternateView = AlternateView.CreateAlternateViewFromString("Hello. To reset your password, please click on this link", Nothing, "text/plain")
-
Dim HtmlMessage As AlternateView = AlternateView.CreateAlternateViewFromString("<img src=cid:dimaHeader><br /><br /><br ><body style='font-family:candara; color:#ffffff; background-color:#858585; margin-left:2em;'>Hello " & strEmailValue & "<br /><br /> To reset your password, please click on this <a href='http://www.dimadayoub.net/newPassword.aspx?token=" & uniqueCode & "' style='color: #0000FF; text-decoration: none;'>link</a><br /><br />Thank you<br /><br />Regards<br /></br />Dima<br /><br ><a href='http://www.dimadayoub.net' target='_blank' style='color: #0000FF; text-decoration: none;'>http://www.dimadayoub.net</a></body>", Nothing, "text/html")
The idea is that the HTML-email that is sent to the user who has forgotten his password, contains a link for him to
reset his password, but I am getting an 'Authentication required' error. Despite the server error, it is unrelated to SMTP credentials, so I am trying to isolate where the problem really lies.
Thanks.
0 1751 Sign in to post your reply or Sign up for a free account.
Similar topics
by: andrew blah |
last post by:
Hello,
I need to get the text of the body (the payload) of an email.
As I understand it, an email has headers at the top, then a blank line,
then the body of the message.
I want to get the...
|
by: Vi |
last post by:
Hi,
Is there a simple way to send an email from ASP.NET using the MailMessage
class with MyMessage.BodyFormat = MailFormat.Html, such that the body of the
email will come from an existing HTML...
|
by: Ashok |
last post by:
Hi,
I am starting a new project to build a software product using APS.NET 2.0.
In past I have used "frameset" and "frame" to build pages. My current
requirements I have coded using frameset and...
|
by: robert |
last post by:
Hi all,
I'm having a hard time resolving a namespace issue in my wsdl. Here's
an element that explains my question, with the full wsdl below:
<definitions name="MaragatoService"...
|
by: Joh |
last post by:
I'm using mailto to open up an email that have a hyperlink in the body.
The hyperlink passes two variables Name and Emailadress. The problem is
that only the first variable Name show up in the...
|
by: Joris De Groote |
last post by:
I can send a mail, no problem, however, the sended mail always comes from
the e-mail adres from the sender
I use this code
myMessage = New MailMessage
With myMessage
..To = ontvanger
|
by: salad |
last post by:
I can store in a a hyperlink like this
ClickMe#http://www.test.com
in Access
ClickMe is the display text, http://www.test.com the address.
Is it possible, using SendObject, to send this...
|
by: PYG |
last post by:
Hi everybody
I have a simple question :
If i use this code :
<body style="font-size:24px;color:blue;">
Text in body
<table>
<tr><td>
Text in table
|
by: david.karr |
last post by:
If in my CSS I set the "background-color" property on the "body"
element, it only covers the background of the elements defined in the
body, up to the current width and height of the page. However,...
|
by: semanticnotion |
last post by:
Hi sir i want to transform the data of one table into another through foreign key but the following error come to my browser
Here is my code and data base structure.
CREATE TABLE IF NOT...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |