application/controllers/ForgotPassword.php
/* function for sending email for setting password of studio */
function for sending email for setting password of studio
function for sending email for setting password of studio
function sendMail($email,$name,$link)
		{
		  $message = '<html>
		              <head></head>
		                <body>
		                  <table cellpadding="5" cellspacing="5" width="95%"  bgcolor="#dfeff7">
		                    <tr bgcolor="#dfeff7">
		                      <td  style="padding:3px;"></td>
		                    </tr>
		                    <tr>
		                      <td bgcolor="#FFFFFF" style="font-family:Arial, Helvetica, sans-serif; color:#333333; font-size:12px;"><p><br />	                      	
		                        <strong> Set your password </strong> <br /><br />
		                          <table cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #d8d8d8;">
		                            <tr>
		                              <td style="padding:5px;" valign="top">
		                                <table width="100%" height="100%" cellpadding="0" cellspacing="0">
		                                  <tr>
		                                    <td colspan="8" height="5px"><center><strong>Welcome in TheUrbanCollective </strong></center><br></td>
		                                  </tr>
		                                  <tr>
		                                    <td colspan="8" height="5px"><strong>Dear '.$name.' </strong><br></td>
		                                  </tr>
		                                  <tr>                     
		                                    <td colspan="8" height="5px"></td>
		                                  </tr>
		                                  <tr>
		                                    <td colspan="8" height="5px"><strong>Please click below to set your password.</strong><br></td>
		                                  </tr>
		                                  <tr>                     
		                                    <td colspan="8" height="5px"></td>
		                                  </tr>
		                                  <tr>
		                                    <td colspan="8" height="5px"><strong><a href="'.$link.'">Set Password</a> </strong><br></td>
		                                  </tr>
		                                  <tr>                     
		                                    <td colspan="8" height="5px"></td>
		                                  </tr>                           
		                                  <tr>                     
		                                    <td colspan="8" height="5px"></td>
		                                  </tr>
		                                  <td colspan="8" height="5px"></td>
		                                  </tr>
		                            <tr>
		                            </center>
		                            <td colspan="8" height="5px">Sincerely,<br>
                                	TheUrbanCollective customer service</td>
                                	</tr>   
                                	<tr><td colspan="8" height="5px"></td>
                                	<td height="5px"></td></tr>                        
		                          </table>
		                        </td>
		                    </tr>
		                 </table>
				            </td>
				          </tr>
				            </table>
				      </body>
				    </html>';
				$mail = new PHPMailer(true); 
				$mail->IsSMTP(); 
				try{
	                $mail->IsHTML(true);	    
	                $mail->SMTPDebug = 1;                                                        
	                $mail->Host = "smtp.googlemail.com"; 
	                $mail->Port = "587"; 
	                $mail->SMTPAuth = true; 
	                $mail->Username = "urbancotech@gmail.com"; 
	                $mail->Password = "TheUrbanCollective"; 
	                $mail->SMTPSecure  = 'ssl'; 
				    $mail->SetFrom("urbancotech@gmail.com",'TheUrbanCollective');
					$mail->Subject = "Set your Urban Collective password";
					$mail->Body = $message;
					$mail->AddAddress($email);
					$send = $mail->Send(); 
					if($send){
						return true;
					}else{
						return false;
					}
				} catch (phpmailerException $e) {
          			return false;
				} catch (Exception $e) {
				  	return false;
				}
		}
function sendMail ( $ email , $ name , $ link ) { $ message = '<html>
		              <head></head>
		                <body>
		                  <table cellpadding="5" cellspacing="5" width="95%"  bgcolor="#dfeff7">
		                    <tr bgcolor="#dfeff7">
		                      <td  style="padding:3px;"></td>
		                    </tr>
		                    <tr>
		                      <td bgcolor="#FFFFFF" style="font-family:Arial, Helvetica, sans-serif; color:#333333; font-size:12px;"><p><br />	                      	
		                        <strong> Set your password </strong> <br /><br />
		                          <table cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #d8d8d8;">
		                            <tr>
		                              <td style="padding:5px;" valign="top">
		                                <table width="100%" height="100%" cellpadding="0" cellspacing="0">
		                                  <tr>
		                                    <td colspan="8" height="5px"><center><strong>Welcome in TheUrbanCollective </strong></center><br></td>
		                                  </tr>
		                                  <tr>
		                                    <td colspan="8" height="5px"><strong>Dear ' . $ name . ' </strong><br></td>

		                                  </tr>
		                                  <tr>                     
		                                    <td colspan="8" height="5px"></td>
		                                  </tr>
		                                  <tr>
		                                    <td colspan="8" height="5px"><strong>Please click below to set your password.</strong><br></td>
		                                  </tr>
		                                  <tr>                     
		                                    <td colspan="8" height="5px"></td>
		                                  </tr>
		                                  <tr>
		                                    <td colspan="8" height="5px"><strong><a href="' . $ link . '">Set Password</a> </strong><br></td>
		                                  </tr>
		                                  <tr>                     
		                                    <td colspan="8" height="5px"></td>
		                                  </tr>                           
		                                  
		                                  <tr>                     
		                                    <td colspan="8" height="5px"></td>
		                                  </tr>
		                                                             
		                                  <td colspan="8" height="5px"></td>

		                                  </tr>
		                            <tr>
		                            </center>
		                            <td colspan="8" height="5px">Sincerely,<br>
                                	TheUrbanCollective customer service</td>
                                	</tr>   
                                	<tr><td colspan="8" height="5px"></td>
                                	<td height="5px"></td></tr>                        
		                          </table>
		                        </td>
		                    </tr>
		                 </table>
				            </td>
				          </tr>
				            </table>
				      </body>
				    </html>' ; $ mail = new PHPMailer ( true ) ; $ mail -> IsSMTP ( ) ; try { $ mail -> IsHTML ( true ) ; $ mail -> SMTPDebug = 1 ; $ mail -> Host = " smtp.googlemail.com " ; $ mail -> Port = " 587 " ; $ mail -> SMTPAuth = true ; $ mail -> Username = " urbancotech@gmail.com " ; $ mail -> Password = " TheUrbanCollective " ; $ mail -> SMTPSecure = 'ssl' ; $ mail -> SetFrom ( " urbancotech@gmail.com " , 'TheUrbanCollective' ) ; $ mail -> Subject = " Set your Urban Collective password " ; $ mail -> Body = $ message ; $ mail -> AddAddress ( $ email ) ; $ send = $ mail -> Send ( ) ; if ( $ send ) { return true ; } else { return false ; } } catch ( phpmailerException $ e ) { return false ; } catch ( Exception $ e ) { return false ; } }
function for sending email for setting password of studio
function for sending email for setting password of studio
//echo $message;exit(); // echo $message;exit(); // create a new object //Hostname of the mail server  ssl://smtp.googlemail.com //Port of the SMTP like to be 25, 80, 465 or 587  ////465 //Whether to use SMTP authentication //Username for SMTP authentication any valid email created in your domain  bamgude.sachin@gmail.com //Password for SMTP authentication  //    $mail->SetFrom("bamgude.sachin@gmail.com"); //whom to send mail // $mail->AddCC(""); //Send the mails //echo $mail->ErrorInfo;exit(); // $this->response(array('ResponseCode' => 0, 'ResponseMessage' => 'FAILURE', 'Comments' => 'MAIL SENDING FAIL','Result'=>$send), 400); // $this->response(array('ResponseCode' => 0, 'ResponseMessage' => 'FAILURE', 'Comments' => 'MAIL SENDING FAIL','Result'=>$send), 400);