Page 1 of 1

email is bouncing

Posted: 2019-03-29 15:17
by R Scott
I upload users (students) in batches of about 200. These students do not have email addresses so I enter my own email in the required field. My hosting service (Namecheap) does not allow relay and is bouncing all of the auto-generated confirmation messages and is now threatening to disable my account due to the high volume of mail.

1. Can the email requirement be disabled, and how ?

2. Can the auto-generated confirmation be disabled ?

Thanks

ver 5.72

Re: email is bouncing

Posted: 2019-03-30 08:56
by pbottcher
Hi,

if you want you can modify the admin/pageEditMembership.php file .

Search for

if($isApproved){
notifyMemberApproval($memberID);
}

and comment the notifyMemberApproval($memberID);

be aware that this file is being overwritten if you recreate your project.

As an alternative you could modify the notifyMemberApproval function in the admin/incFunctions.php

Code: Select all

	function notifyMemberApproval($memberID){
		$adminConfig = config('adminConfig');
		$memberID = strtolower($memberID);

		$email = sqlValue("select email from membership_users where lcase(memberID)='{$memberID}'");

		return sendmail(array(
			'to' => $email,
			'name' => $memberID,
			'subject' => $adminConfig['approvalSubject'],
			'message' => nl2br($adminConfig['approvalMessage'])
		));
	}
and check for example if a defined email address is definied for the user (e.g. [email protected]).

Code: Select all

	function notifyMemberApproval($memberID){
		$adminConfig = config('adminConfig');
		$memberID = strtolower($memberID);

		$email = sqlValue("select email from membership_users where lcase(memberID)='{$memberID}'");
		
		if ($email =="[email protected]") return;
		
		return sendmail(array(
			'to' => $email,
			'name' => $memberID,
			'subject' => $adminConfig['approvalSubject'],
			'message' => nl2br($adminConfig['approvalMessage'])
		));
	}
be aware that this file is being overwritten if you recreate your project.

Re: email is bouncing

Posted: 2019-04-03 02:24
by R Scott
This solved my problem. Thanks for the quick and easy solution.