email is bouncing

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
R Scott
Posts: 14
Joined: 2018-01-04 18:42

email is bouncing

Post by R Scott » 2019-03-29 15:17

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

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: email is bouncing

Post by pbottcher » 2019-03-30 08:56

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.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

R Scott
Posts: 14
Joined: 2018-01-04 18:42

Re: email is bouncing

Post by R Scott » 2019-04-03 02:24

This solved my problem. Thanks for the quick and easy solution.

Post Reply