Unable to send and receive email after domain name change

Hello, I am using ojs2.4.8, at first I was using a temporary secondary domain name used to release my system, my email is can use at that time, recently I applied for a new domain name has effect, so I will be a new domain name to a temporary domain name address before, but has been unable to receive mail, I want to know where is wrong, if possible I hope you can tell me how to test the backstage function code, for example, what I need in the navigation bar to show the test results,
If you can, you could visit our website at www.yandy-ager.com
please help me.
thank you very much

Did you change the server architecture when you changed to the new domain name, or did the hosting machine stay the same? For example, did you copy the database and files to a new VM, or did you just point the new domain at the IP of the test server?

To send a test email, navigate to:
User Home →
Journal Manger →
Prepared Emails →
(select an email and click the “envelope” image).

This will ultimately call the PHP code:

Your next step is likely looking the PHP error log and the mail log for the server. You may need the assistance of your system administrator or service provider for access to these logs.

Firstly,I’m very happy that you can rely me so quickly ,because of time difference ,I can’t see it on time.then ,I sent the mail as you said ,but I don’t know how to looking PHP error log and mail log, now the project only has a staff that’s me, I have highest authority ,but I don’t have any company, so I wish that I can get your help.
Thank you very much.

What kind of server architecture are you using? Is it self-hosted, where you have access to the command prompt and the root user? Or, is it a shared server, where you have access to a web interface like cPanel for administration?

Did this change with the domain name change?

I used a shared server,I think I can access to it if I understood your words.

I used sina cloud server,
What can I do next step?

You’ll want to check with your hosting provider regarding how to access the PHP error log and the mail log.

Yes,I think I have access to log center,but there is not any record in mail log

Check the PHP error log around the time when you clicked the “Send” button in the web. You would be looking for messages like “WARN” or “ERROR” and can ignore “NOTICE” or “STRICT” messages.

If you are familiar with PHP code, and if you are comfortable modifying the core files, we can suggest some debugging code to help identify the issue.

After I clicked "Send ",I just saw this log:
www.yandy-ager.com 3002776 980 [09/Oct/2018:21:21:50 +0800] astp 190 1 “GET /index.php/astp/manager HTTP/1.1” 200 15655 “http://www.yandy-ager.com/index.php/astp/manager/email?template=BFR_BOOK_ASSIGNED” “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:62.0) Gecko/20100101 Firefox/62.0” bx157
It seems like there is no error message,and the mail log is null
The contents shown above are that the error log of the mail is empty,I’m not sure if you can understand me. My English is poor

Your English is quite fine. Is there an “Error Log” option under the HTTP tab? The line from the log starting with “www.yandy-ager.com” is an HTTP access log. HTTP did not return an error, but there may still be a PHP warning which could explain the problem.

The mail error log you are showing seems to confirm that the error does not occur at the local mail transfer level.

What are your settings for mail in config.inc.php?

There is not an “Error Log” option under the HTTP tab,my config.ini.php is here:

; Email Settings ;


; Use SMTP for sending mail instead of mail()
smtp = On

; SMTP server settings
smtp_server = “smtp.126.com
smtp_port = 25

; Force the default envelope sender (if present)
; This is useful if setting up a site-wide noreply address
; The reply-to field will be set with the reply-to or from address.
; force_default_envelope_sender = Off

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
smtp_auth = PLAIN
smtp_username = “xxxxx”
smtp_password = “xxxxxxxxxx”

; Allow envelope sender to be specified
; (may not be possible with some server configurations)
allow_envelope_sender = Off

; Default envelope sender to use if none is specified elsewhere
default_envelope_sender = “feiyan939@126.com

; Enable attachments in the various “Send Email” pages.
; (Disabling here will not disable attachments on features that
; require them, e.g. attachment-based reviews)
enable_attachments = On

; Amount of time required between attempts to send non-editorial emails
; in seconds. This can be used to help prevent email relaying via OJS.
time_between_emails = 3600

; Maximum number of recipients that can be included in a single email
; (either as To:, Cc:, or Bcc: addresses) for a non-priveleged user
max_recipients = 50

; If enabled, email addresses must be validated before login is possible.
require_validation = Off

; Maximum number of days before an unvalidated account expires and is deleted
validation_timeout = 14

Thanks for your praise, It’s maybe another cause, I just saw on the Internet that if the website outside China needs to do reverse parsing, I’m trying to reparse the domain name if there is no better way to resolve it,what do you think?

Hi, you should have got up by this time, I think I found the error log,I started saying SMTP couldn’t be authenticated, so I disabled SMTP, turned on PHPMailer, then prompt the warning message to say:WARNING: mail() has been disabled for security reasons,what can I do next?Screenshot_2018-10-10%20%E6%97%A5%E5%BF%97%E4%B8%AD%E5%BF%83%20-%20%E4%BA%91%E5%BA%94%E7%94%A8%EF%BC%88SAE%EF%BC%89%20-%20%E6%96%B0%E6%B5%AA%E4%BA%91
Thank you for your help.

Yes, that is helpful detail.

Check with your hosting provider whether the PHP mail() function can be turned on for your host. If it cannot, you will need to provide valid SMTP settings which OJS can use. You hosting provider may be able to provide guidance on connecting to their SMTP server, which may or may not involve a username and password.

My hosting provider told me that I can’t use mail(). That may mean that I can only use SMTP to send email,then he give me a piece of code,as follow
<?php $mail = new SaeMail(); $mail->setAttach( array( ‘my_photo’ => ‘照片的二进制数据’ ) ); $ret = $mail->quickSend( ‘to@sina.cn’ , ‘邮件标题’ , ‘邮件内容’ , ‘smtpaccount@gmail.com’ , ‘password’ ); //发送失败时输出错误码和错误信息 if ($ret === false) var_dump($mail->errno(), $mail->errmsg()); $mail->clean(); // 重用此对象 $ret = $mail->quickSend( ‘to@sina.cn’ , ‘邮件标题’ , ‘邮件内容’ , ‘smtpaccount@unknown.com’ , ‘password’ , ‘smtp.unknown.com’ , 25 ); // 指定smtp和端口 //发送失败时输出错误码和错误信息 if ($ret === false) var_dump($mail->errno(), $mail->errmsg()); ?>

Do I need to add this code next?Where to add?

Not only that, he also provides a special SDK for sending emails,File saemail.class.php
then what should I do?

Hi, I sent the email with your help,thank you very much,but I have another question that is my SMTP username must be consistent with the sender of the message, how to handle the question?

Are you comfortable modifying PHP? If so, you should be able to modify lib/pkp/class/mail/Mail.inc.php to include calls to the SaeMail API/SDK. This would be a local modification that you would need to support and maintain.

The difference between the SMTP username and the From address is a question of SPF and DMARC. There are a number of threads on this board which describe this, the most recent of which is here: