473,563 Members | 2,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mail SMTP Passwords / Secure Login

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.SmtpSe rver = "smtp.server.co m"

_mm.

_mm.BodyFormat = Mail.MailFormat .Html

_mm.From = xx**@xxx.com

_mm.Subject = "IPN Error"

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

_mm.To = "yy*@yyyy.c om"

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

SmtpMail.Send(_ mm)

Catch ex As Exception

Debug.WriteLine (ex.Message)

End Try

End Sub



Nov 18 '05 #1
2 1988
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

"tma" <tm*@allisconfu sing.net> wrote in message
news:u3******** ******@tk2msftn gp13.phx.gbl...
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.SmtpSe rver = "smtp.server.co m"

_mm.

_mm.BodyFormat = Mail.MailFormat .Html

_mm.From = xx**@xxx.com

_mm.Subject = "IPN Error"

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

_mm.To = "yy*@yyyy.c om"

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

SmtpMail.Send(_ mm)

Catch ex As Exception

Debug.WriteLine (ex.Message)

End Try

End Sub




Nov 18 '05 #2
Actually you can with .NET 1.1 as it exposes the Fields property that allows
to define CDOSYS uinderlying properties :

http://www.codeproject.com/dotnet/Sy..._SMTP_AUTH.asp

Patrice

--

"tma" <tm*@allisconfu sing.net> a écrit dans le message de
news:u3******** ******@tk2msftn gp13.phx.gbl...
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.SmtpSe rver = "smtp.server.co m"

_mm.

_mm.BodyFormat = Mail.MailFormat .Html

_mm.From = xx**@xxx.com

_mm.Subject = "IPN Error"

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

_mm.To = "yy*@yyyy.c om"

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

SmtpMail.Send(_ mm)

Catch ex As Exception

Debug.WriteLine (ex.Message)

End Try

End Sub




Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7927
by: Mark Carter | last post by:
I'm trying to create a mail server in Twisted. I either get SMTPSenderRefused or SMTPException: SMTP AUTH extension not supported by server. What do I need to do to get it to work?
8
5459
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I...
19
2428
by: Cord-Heinrich Pahlmann | last post by:
Hi, I have written a tool wich de/encrypts a few of my forum and bloggin-Passwords. My question is how secure it is. The following describes how I have encrypted my passwords. When I log in, the Login-Password is changed into a md5-Hash and is compared to the login-password in the db. If the passwords are the same the use is logged in...
5
4210
by: Sin Jeong-hun | last post by:
Hi. I would like to let users send bug reports or other messages to me. Maybe the easiest way to send e-mails from my application is just use the default e-mail agent by executing a link mailto://mymail@domail.com. But this only works if the user has configured Outlook or something. Many users use web-based mails here so if I do so,...
1
2895
rsrinivasan
by: rsrinivasan | last post by:
Hi, I am Sending mail from java. When I run the program I hava Following error.. DEBUG: setDebug: JavaMail version 1.4ea DEBUG: getProvider() returning javax.mail.Provider DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: trying to connect to host "smtp.hotpop.com", port 25, isSSL false 220...
12
4129
by: kimiraikkonen | last post by:
Hello, I'm trying to create a basic SMTP mail sender using that code, i'm using VB.NET 2005 "express" but this namespace wasn't recognized... (system.web.MAIL) I'm only allowed to declare under that namespaces with "system.web": System.Wb.AspNetHostingPermission System.Web.AspNetHostingPermissionAttribute...
1
2865
by: the_ricka | last post by:
Hi all, I'm fairly new to python, but very excited about it's potential. I'm trying to write a simple program that will accept input from a command line and send email. The parameters I used on the command line are for From address, To addresses, Subject and Body. For the body, I thought it would be better to read the input from a file so...
5
3104
by: sui | last post by:
this is my code import sys, os, glob, datetime, time import smtplib ## Parameters for SMTP session port=587 SMTPserver= 'smtp.gmail.com' SMTPuser= '...@gmail.com' pw= 'fill in here' SENDER= SMTPuser
5
12989
topher23
by: topher23 | last post by:
I've seen a lot of questions about how to make secure database passwords. I'm going to go over a method of encrypting a password using the MD5 encryption algorithm for maximum security. First, you will need to download the attached class module (clsMD5.txt) and import it into your database. This class module is the core of what we're about to...
0
7885
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7638
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5484
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.