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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 506k
  • Answers 506k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The last comment in this thread shows why and gives… May 16, 2026 at 3:48 pm
  • Editorial Team
    Editorial Team added an answer It sounds like the "execute" permission bit is not set… May 16, 2026 at 3:48 pm
  • Editorial Team
    Editorial Team added an answer As racetrack mentioned, there are other ways of getting your… May 16, 2026 at 3:48 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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 tried to send a text email with non-English characters using PHPs mail function.
I am using mail message class to send an email. But if i check
I'm using Grails Mail plugin and trying to send email and keep getting: Error
I'm preparing a website that will send email notifications to registered users. From my
I'm using ajax to submit a contact from without reloading the page, it works
I am trying to send email using the following method in my action class:
I'm trying to send SMTP e-mails using PHPMailer, but I keep getting this error

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.