[Link]
aspx
[Link] sending email
Visual [Link] - Send Email using Yahoo Account
Yahoo SMTP server address is "[Link]". It supports both Normal and SSL
connection to do user authentication, and you should use your Yahoo email address as the user
name for ESMTP authentication. For example: your email is "myid@[Link]", and then the
user name should be "myid@[Link]".
If you want to use SSL connection with Yahoo SMTP server, you must set the port to 465. The
following example codes demonstrate how to send email using Yahoo SMTP server.
Installation
Before you can use the following sample codes, you should download the EASendMail
Installer and install it on your machine at first.
Add Reference of EASendMail to Visual [Link] Project
To use EASendMail SMTP Component in your project, the first step is "Add reference of
EASendMail to your project". Please create/open your project with Visual [Link], then
choose menu->"Project"->"Add Reference"->".NET"->"Browse...", and choose the
EASendMail{version}.dll from your disk, click "Open"->"OK", the reference of EASendMail will
be added to your project, and you can start to use EASendMail to send email in your Visual
[Link] project.
Because EASendMail has separate builds for .Net Framework, please refer to the following table
and choose the correct dll.
Separate builds of run-time assembly for .Net Framework 1.1, 2.0, 3.5, 4.0 and .Net
Compact Framework 2.0, 3.5.
File .NET Framework Version
[Link] Built with .NET Framework 1.1
It requires .NET Framework 1.1, 2.0, 3.5 or later
version.
[Link] Built with .NET Framework 2.0
It requires .NET Framework 2.0, 3.5 or later
version.
[Link] Built with .NET Framework 3.5
It requires .NET Framework 3.5 or later version.
[Link] Built with .NET Framework 4.0
It requires .NET Framework 4.0 or later version.
[Link] Built with .NET Compact Framework 2.0
It requires .NET Compact Framework 2.0, 3.5 or
later version.
[Link] Built with .NET Compact Framework 3.5
It requires .NET Compact Framework 3.5 or later
version.
C# | VB6 | Visual [Link] | Managed C++ | Visual C++ | Delphi
' The following example codes demonstrate sending email message using Yahoo
SMTP server.
' To get full sample projects, please download and install EASendMail on
your machine.
' To run it correctly, please change SMTP server, user, password, sender,
recipient value to yours
' Add EASendMail Namespace
Imports EASendMail
Module Module1
Sub Main()
Dim oMail As New SmtpMail("TryIt")
Dim oSmtp As New SmtpClient()
' Your Yahoo email address
[Link] = "myid@[Link]"
' Set recipient email address, please change it to yours
[Link] = "support@[Link]"
' Set email subject
[Link] = "test email from yahoo account"
' Set email body
[Link] = "this is a test email sent from [Link] project with
yahoo"
' Yahoo SMTP server address
Dim oServer As New SmtpServer("[Link]")
' For example: your email is "myid@[Link]", then the user should
be "myid@[Link]"
[Link] = "myid@[Link]"
[Link] = "yourpassword"
' Because yahoo deploys SMTP server on 465 port with direct SSL
connection.
' So we should change the port to 465.
[Link] = 465
' detect SSL/TLS type automatically
[Link] = [Link]
Try
[Link]("start to send email over SSL ...")
[Link](oServer, oMail)
[Link]("email was sent successfully!")
Catch ep As Exception
[Link]("failed to send email with the following
error:")
[Link]([Link])
End Try
End Sub
End Module
[Link]
end Email using Yahoo in [Link]
Date: Oct 14, 2013
In previous section,I introduced how to send email using Gmail account. In this section, I will
introduce how to send email using Yahoo account in [Link].
Yahoo SMTP server address is "[Link]". It supports both Normal/Implicit
SSL/Explicit SSL (TLS) connection to do user authentication, and you should use your Yahoo
email address as the user name for ESMTP authentication. For example: your email is
"myid@[Link]", and then the user name should be "myid@[Link]".
If you want to use implicit SSL connection with Yahoo SMTP server, you must set the port to
465.
Remarks: All of samples in this section are based on first section: Send email in a simple
[Link] project. To compile and run the following example codes successfully, please
click here to learn how to create the test project and add reference of EASendMail to your
project.
[[Link] - Send Email using Yahoo over Implicit SSL on 465 Port - Example]
The following example codes demonstrate how to send email using Yahoo account in VB over
SSL 465 port. To get full sample projects, please refer to Samples section.
Imports EASendMail 'Add EASendMail namespace
Module Module1
Sub Main()
Dim oMail As New SmtpMail("TryIt")
Dim oSmtp As New SmtpClient()
' Your Yahoo email address
[Link] = "myid@[Link]"
' Set recipient email address, please change it to yours
[Link] = "support@[Link]"
' Set email subject
[Link] = "test email from yahoo account"
' Set email body
[Link] = "this is a test email sent from [Link] project with
yahoo"
' Yahoo SMTP server address
Dim oServer As New SmtpServer("[Link]")
' For example: your email is "myid@[Link]", then the user should
be "myid@[Link]"
[Link] = "myid@[Link]"
[Link] = "yourpassword"
' Because yahoo deploys SMTP server on 465 port with implicit SSL
connection.
' So we should change the port to 465.
[Link] = 465
' detect SSL/TLS type automatically
[Link] = [Link]
Try
[Link]("start to send email over SSL ...")
[Link](oServer, oMail)
[Link]("email was sent successfully!")
Catch ep As Exception
[Link]("failed to send email with the following
error:")
[Link]([Link])
End Try
End Sub
End Module
[[Link] - Send Email using Yahoo over Explicit SSL (TLS) on 25 or 587 Port - Example]
The following example codes demonstrate how to send email using Yahoo account in [Link]
over TLS 25 port. To get full sample projects, please refer to Samples section.
Imports EASendMail 'Add EASendMail namespace
Module Module1
Sub Main()
Dim oMail As New SmtpMail("TryIt")
Dim oSmtp As New SmtpClient()
' Your Yahoo email address
[Link] = "myid@[Link]"
' Set recipient email address, please change it to yours
[Link] = "support@[Link]"
' Set email subject
[Link] = "test email from yahoo account"
' Set email body
[Link] = "this is a test email sent from [Link] project with
yahoo"
' Yahoo SMTP server address
Dim oServer As New SmtpServer("[Link]")
' For example: your email is "myid@[Link]", then the user should
be "myid@[Link]"
[Link] = "myid@[Link]"
[Link] = "yourpassword"
' set 25 port, if you want to use 587 port, please change 25 to 587
[Link] = 25
' detect SSL/TLS type automatically
[Link] = [Link]
Try
[Link]("start to send email over SSL ...")
[Link](oServer, oMail)
[Link]("email was sent successfully!")
Catch ep As Exception
[Link]("failed to send email with the following
error:")
[Link]([Link])
End Try
End Sub
End Module