Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7586043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:19:34+00:00 2026-05-30T19:19:34+00:00

Here’s a scenario; I want to send email using PHP and Zend Framework. Here’s

  • 0

Here’s a scenario; I want to send email using PHP and Zend Framework. Here’s an example on how this is usually done:

$smtp = new \Zend_Mail_Transport_Smtp(array(
    'host'=> 'localhost'
    , 'auth' => 'login'
    , 'ssl' => 'TLS'
    , 'username' => 'john'
    , 'password' => '123'));
\Zend_Mail::setDefaultTransport($smtp);
$mail = new \Zend_Mail();
$mail->addTo('jane.smith@localhost', 'Jane Smith');
$mail->setSubject('Greetings');
$mail->setBodyText('Hi there');
$mail->setFrom('john.smith@localhost', 'John Smith');
$mail->send();

My question is, how can we make sure that the from address (in this case ‘john.smith@localhost’) actually exists and it belongs to the username and password provided to SMTP connection? Because if it is not, then I can send email on behalf of anyone!

[UPDATE]

I believe I found a partial answer to my own question. It should be done through IMAP / POP3 protocols. But yet these two protocols take in a username and password in order to athenticate and so you can not check for the association between the provided username and an email address. So the question is how to authenticate an email address through IMAP / POP3 in PHP and Zend Framework?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:19:35+00:00Added an answer on May 30, 2026 at 7:19 pm

    SMTP does allow to send emails as anyone. This is why most security-oriented people promote the use of digital signatures.

    Validation can be done by the SMTP itself. Gmail’s SMTP will refuse to send emails with an address not attached to the account for example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is an example. foreach (var doc in documents) { var processor = this.factory.Create();
Here is what I want to do. Use this HTML line and have the
Here is what I am trying to achieve in PHP: I have this string:
Here's my scenario - I have an SSIS job that depends on another prior
Here's a coding problem for those that like this kind of thing. Let's see
Here is the scenario: I'm writing an app that will watch for any changes
Here is the code I'm using http://jsbin.com/evike5/edit When the jQuery UI dialog is fired
Here's my problem I have this javascript if (exchRate != ) { function roundthecon()
Here's my search array: $aExt = array('png','jpg','gif'); I want to search through the variable:
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.