Sendmail sender mailbox setting in PHP

Source: Internet
Author: User

I used to set the sender suffix. This migration server forgot to record it from the beginning.

1: first, modify/etc/hosts. It is said that Sendmail uses the local domain name set in hosts. The solution is as follows:

 
127.0.0.1 aizher.com

Result: No.

2: Method 2: Fix/etc/mail/acess and add

 
Connect: aizher.com Relay

Result: The sendmail configuration is not successful. You can modify the sendmail configuration as follows: hosts/etc/mail/Local-host-names.

 
Aizher.com

3: method 3: Modify

Edit/etc/mail/sendmail. MC: local_domain ('localhost. localdomain ') DNL to local_domain ('youdomain. com') DNL and then M4 sendmail. MC> sendmail. cfservice Sendmail restart

Result: The path does not exist. Failed.

 
M4: Sendmail. MC: 10: cannot open '/usr/share/sendmail-CF/M4/Cf. M4': no such file or directory

The reason for the above error is that sendmail-cf is not installed and Sendmail is installed through yum.

 
Yum install sendmail-cf

4: Method 4: Modify the host name. Remember to modify it before. The host name is related to the email sent by Sendmail. Vim/etc/sysconfig/Network

 
Networking = yeshostname = aizher. comgateway = 219.234.xx.xx

Run the following command to restart the network service:
/Etc/init. d/network restart

Run the following command to restart Sendmail:

/Etc/rc. d/init. d/sendmail restart

Result: The email is successfully sent using the login user name.

5: Method 5: directly modify it in PHP. ini,

 
Sendmail_path =/usr/sbin/sendmail-F admin@aizher.com-t-I

At this time, the admin@aizher.com method to send email, get it done.

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.