Mail SMTP Passwords / Secure Login

T

tma

Is there a way to send username and passwords to a mail server using code
similar to below? My email server requires a username and password to send
mail.

Private Sub MailError(ByVal ErrorMessage As String)

Try

Dim _mm As New MailMessage

SmtpMail.SmtpServer = "smtp.server.com"

_mm.

_mm.BodyFormat = Mail.MailFormat.Html

_mm.From = (e-mail address removed)

_mm.Subject = "IPN Error"

_mm.Body = "IPN Error " & "<br />" & vbCrLf & "<br />" & vbCrLf

_mm.To = "(e-mail address removed)"

_mm.Body = "Transaction time: " & DateTime.Now & vbCrLf & vbCrLf &
ErrorMessage

SmtpMail.Send(_mm)

Catch ex As Exception

Debug.WriteLine(ex.Message)

End Try

End Sub
 
M

Mark Fitzpatrick

Not with the built-in mailnamespace. CDO doesn't have this, which is what
hte mail namespaces are built on. There should be a number of free mail
components though that do not rely on CDO to send email that support SMTP
authentication. Check the components at www.asp.net and also look for SMTP
components at www.sourceforge.com

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SMTP isn't working from aspx page 3
Mail sent through IIS virtual SMTP server not arriving 34
SMTP Mail 0
OPERATOR '&' IS NOT DEFINED 38
mail problem 2
Mail message attachement problem 1
SMTP mail server... 0
SMTP 1

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top