Authentication Class | BasicAuthentication Class | Programming with FireMail for .NET

Language

Visual Basic

C#

Show All

The authentication service allows SMTP clients to get authenticated by the server before sending mail. FireMail currently provides Basic and NTLM Authentication.

This will only be supported in servers that have authentication service extension.

Below is an example demonstrating BasicAuthentication.

[Visual Basic]
' Create a Plain Text Message 
Dim message As PlainTextMessage =  New PlainTextMessage("from@company.com","to@company.com","Check message for Connection","Connection Check") 
 
'Create a BasicAuthentication
Dim MyAuthentication As BasicAuthentication =  New BasicAuthentication("userName","password") 
 
' Create a Connection
Dim MyConnection As Connection =  New Connection("serverName.com",MyAuthentication) 
 
' Send the message with created Connection
message.Send(MyConnection)
[C#]
// Create a Plain Text Message 
PlainTextMessage message = new PlainTextMessage( "from@company.com", "to@company.com", "Check message for Connection", "Connection Check");
                        
//Create a BasicAuthentication
BasicAuthentication authentication = new BasicAuthentication( "userName", "password" );
                        
// Create a Connection
Connection connection = new Connection( "serverName.com" , authentication );
                        
// Send the message with created Connection
message.Send( connection );

See Also 

Authentication Class | BasicAuthentication Class | Programming with FireMail for .NET