Project

General

Profile

« Previous | Next » 

Revision 2063

Added by Dietmar almost 11 years ago

  1. problems with confirmation mail solved

View differences:

signup_mails.php
23 23
}
24 24
/* -------------------------------------------------------- */
25 25

  
26
            $search  = array();
27
            $replace = array();
26 28
		//WB_MAILER settings
27 29
			$sServerEmail = (defined('SERVER_EMAIL') && SERVER_EMAIL != '' ? SERVER_EMAIL : emailAdmin());
28 30
			$sWebMailer   = (defined('WBMAILER_DEFAULT_SENDERNAME') && WBMAILER_DEFAULT_SENDERNAME != '' ? WBMAILER_DEFAULT_SENDERNAME : 'WebsiteBaker Mailer');
......
42 44

  
43 45
				$mail_replyto = $email_to;
44 46
				$mail_replyName = $sDisplayName;
45
				$mail_message = $MESSAGE['SIGNUP2_ADMIN_INFO'];
46
				$email_subject = $MESSAGE['SIGNUP2_NEW_USER'];
47
				$mail_message = $mLang->MESSAGE_SIGNUP2_ADMIN_INFO;
48
				$email_subject = $mLang->MESSAGE_SIGNUP2_NEW_USER;
47 49
				$search = array('{LOGIN_EMAIL}','{LOGIN_ID}', '{SIGNUP_DATE}', '{LOGIN_NAME}', '{LOGIN_IP}');
48 50
				$replace = array($email_to, $email_fromname.' ('.$user_id.')', date(DATE_FORMAT.' '.TIME_FORMAT,$get_ts ), $sLoginName, $get_ip);
49 51
				$mail_message = str_replace($search, $replace, $mail_message);
......
53 55

  
54 56
// prepare confirmation mail to user, easy old style
55 57
				if(($email_to != '') && $bSaveRegistration) {
56
					$email_subject = $MESSAGE['SIGNUP2_SUBJECT_LOGIN_INFO'];
57
					$mail_message = $MESSAGE['SIGNUP2_BODY_LOGIN_INFO'].$MESSAGE['SUCCESS_EMAIL_TEXT_GENERATED'];
58
					$search = array('{LOGIN_DISPLAY_NAME}', '{LOGIN_WEBSITE_TITLE}', '{LOGIN_NAME}', '{LOGIN_PASSWORD}');
58
					$sEmailSubject = $mLang->MESSAGE_SIGNUP2_SUBJECT_LOGIN_INFO;
59
					$mail_message  = $mLang->MESSAGE_SIGNUP2_BODY_LOGIN_INFO.$mLang->MESSAGE_SUCCESS_EMAIL_TEXT_GENERATED;
60
					$search  = array('{LOGIN_DISPLAY_NAME}', '{LOGIN_WEBSITE_TITLE}', '{LOGIN_NAME}', '{LOGIN_PASSWORD}');
59 61
					$replace = array($sDisplayName, WEBSITE_TITLE, $sLoginName, $sNewPassword);
60 62
					$mail_message = str_replace($search, $replace, $mail_message);
61 63
				}
......
64 66
				if(($email_to != '') && $bSaveRegistration) {
65 67
//					$daylight_saving = date('I');
66 68
					$sConfirmedTimeOut = gmdate('Y/m/d H:i',$sTimeOut).' GMT';
67
					$email_subject = $MESSAGE['SIGNUP_ACTIVATION'];
68
					$search = array('{LOGIN_DISPLAY_NAME}', '{LOGIN_WEBSITE_TITLE}', '{LOGIN_NAME}', '{LINK}', '{CONFIRMED_REGISTRATION_ENDTIME}');
69
					$sEmailSubject = $mLang->MESSAGE_SIGNUP_ACTIVATION;
70
					$search = array("{LOGIN_DISPLAY_NAME}", "{LOGIN_WEBSITE_TITLE}", "{LOGIN_NAME}", "{LINK}", "{CONFIRMED_REGISTRATION_ENDTIME}" );
69 71
					$replace = array($sDisplayName, WEBSITE_TITLE, $sLoginName, $sConfirmedLink,$sConfirmedTimeOut);
70
					$mail_message = $MESSAGE['SEND_CONFIRMED_REGISTRATION'].$MESSAGE['SUCCESS_EMAIL_TEXT_GENERATED'];
72
					$mail_message = $mLang->MESSAGE_SEND_CONFIRMED_REGISTRATION.$mLang->MESSAGE_SUCCESS_EMAIL_TEXT_GENERATED;
71 73
					$mail_message = str_replace($search, $replace, $mail_message);
74
//print '<pre style="text-align: left;"><strong>function '.__FUNCTION__.'( '.''.' );</strong>  basename: '.basename(__FILE__).'  line: '.__LINE__.' -> <br />'; 
75
//print_r( $mail_message ); print '</pre>'; // flush ();sleep(10); die();
72 76
				}
73 77
			}
74 78
// now send user email, first prepare values for both of type
......
77 81
			$recipient = preg_replace( $regex, "?", $sDisplayName );
78 82
			$email_fromname = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "?", $recipient );
79 83
			$email_body = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $mail_message );
80

  
81
			$bSendRegistrationMailtoUser = $wb->mail($sServerEmail,$email_to,$email_subject,$email_body,$sWebMailer);
84
			$bSendRegistrationMailtoUser = $wb->mail($sServerEmail,$email_to,$sEmailSubject,$email_body,$sWebMailer);

Also available in: Unified diff