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 633317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:10:21+00:00 2026-05-13T20:10:21+00:00

i am using mail() function to send email from PHP without any authentication. This

  • 0

i am using
mail() function to send email from PHP without any authentication.

This function only work on my web server, but does not work on a local machine.

I am looking for best PHP function to send a email with authentication which would work on any machine without modifying the php.ini

i am using PHP with IIS and windows

thanks

  • 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-13T20:10:22+00:00Added an answer on May 13, 2026 at 8:10 pm

    Another possibility is to install mail and net_smtp through pear.

    pear install Mail
    pear install Net_Smtp
    

    then you have the possibility to send mail with SMTP authentication to another server:

    require_once "Mail.php";
    
    $body = "Mein Mail Body\n";
    $subject = "Mail mit SMTP Authentifizierung";
    $mail_to = "zumir@meinemailserver.de";
    $mail_from = "phpmailer@meinemailserver.de";
    
    //SMTP Verbindungsdaten
    $host = "smtp.meinemailserver.de";
    $username = "phpmailer";
    $password = "SuperGeheim";
    
    $smtp = Mail::factory('smtp',
     array (
     'host' => $host,
     'auth' => true,
     'username' => $username,
     'password' => $password
    ));
    
    $headers = array (
     'From' => $mail_from,
     'To' => $mail_to,
     'Subject' => $subject
    );
    $mail = $smtp->send($mail_to, $headers, $body);
    
    if (PEAR::isError($mail)) {
     echo "Fehler beim Versender der E-Mail : ". $mail->getMessage();
    }
    

    (taken from http://www.jgeppert.com/2009/06/php-e-mail-mit-smtp-authentifizierung-versenden/)

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

Sidebar

Related Questions

once we send email from php using mail() function, is there any way to
I am using php's mail() function to send an email from a php scrpit,
I'm using the PHP mail() function to send email from a contact form. The
I wish to send an email from my localhost machine (using PHPs mail function)
I've got a project where by I send email using PHP's inbuilt mail() function,
Hi I am using php mail function to send mails from my contact section.
I can't seem to send any mail using PHP's mail() function whenever I specify
I am using this function to send an email, but this does nto work..
i am using php and mail function , but i face this error: Warning:
I have a PHP application that sends email using the pear Mail function. Unfortunately

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.