SMTP Email PHP Tutorial


Published on

Learn how to send email through SMTP in Prodigy

Published in: Technology
1 Comment
  • Another simple solution would be SMTP4PHP
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

SMTP Email PHP Tutorial

  1. 1. SMTP Email
  2. 2. OverviewObjectiveLearn how to send email through simple mail transferprotocol(SMTP).Requirements Understanding the basics of sending an email in ProdigyViewEstimated Time10 Minutes
  3. 3. Follow Along With Code Example1. Download a copy of the example code at Install the system in an environment you feel comfortable testing in.3. Proceed to examples/util/SMTP.php
  4. 4. What is SMTPSMTP is short for Simple Mail Transfer Protocol. It is astandard for sending electronic mail over an IP(InternetProtocol).SMTP normally uses port 25 or port 587.SMTP normally requires a username andpassword, which makes it secure than PHP mailfunction.You can have your own SMTP server but there areadvantages to using a service that provides use of theirSMTP servers.
  5. 5. SMTP ServiceUsing SMTP service has advantages over sending emailwith regular php mail.1. Handles Mail Problems: Using a SMTP service will handle the problems encountered when sending mail such as bouncing, retries and queues.2. Spam: Your emails sent are less likely to be considered spam if they are being sent but a trusted host.
  6. 6. Installing SMTPSMTP uses the PEAR mail classes. In order to useSMTP, below are instructions on how to install the requiredpackages on Ubuntu and Centos.Ubuntu apt-get install pearCentos yum install php-pearBoth pear install mail pear install Net_SMTP
  7. 7. Sending Email SMTPIf you know the basics of sending email in ProdigyView, thosesame values are used when sending a regular email. The onlydifference is the SMTP information is passed when sending anemail and the method PVMail::sendEmailSMTP() is used.
  8. 8. HostThe SMTP Host is the server that will be sending theemail. The server is normally either an ip address( or a host name (
  9. 9. PortSMTP runs on various ports but the most common is port25 and Secure SMPT runs on port 465. The ports thataccepts SMTP can be change if you have access to themail server.
  10. 10. User & PasswordIf the SMTP service you are using is secure, a usernameand password should be required. This will keepunauthorized access from potential users such aspammers from sending emails.
  11. 11. Send the Email The last step in the process is sending the email.1. Email Information2. SMTP Information3. Send email
  12. 12. API ReferenceFor a better understanding of the email, visit the api byclicking on the link below.PVMail More TutorialsFor more tutorials, please visit: