Do I need to change the php. ini file after using PHPMailer?-php Tutorial

Source: Internet
Author: User
After PHPMailer is used, do I need to change the php. ini file? I can use the tutorial on the Internet to send an email directly. I don't need to change the IIS or PHP. ini file. But here I will report an error:
Warning: mail (): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php. ini or use ini_set () in C: \ inetpub \ wwwroot \ test \ conn \ pwdEmail. php on line 43 Mail Sent. SMTP-> ERROR: Failed to connect to server: (0)
SMTP Error: cocould not connect to SMTP host. An Error occurred while sending the email: SMTP Error: cocould not connect to SMTP host.
Guidance


Reply to discussion (solution)

How did you use it? How can I use the mail () function?
Paste your code

Forgot to block it. thank you for your advice!

How did you use it? How can I use the mail () function?
Paste your code
Could you tell me another small question: I tried the smtp method of 163, and the connection could not be reached! I tried my QQ mailbox again. I can connect it, but it was filtered out before it was sent !!!! You must enter the verification code on the login page of the QQ mailbox to complete sending!
Thank you for your guidance!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.