Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function odesliMail($prijemce){
- $mail = new PHPMailer();
- $mail->IsSMTP();
- //GMAIL config
- $mail->SMTPAuth = true; // enable SMTP authentication
- $mail->SMTPSecure = "ssl"; // sets the prefix to the server
- $mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
- $mail->Port = /*465*/25; // set the SMTP port for the GMAIL server
- $mail->Username = "jankslavik@gmail.com"; // GMAIL username
- $mail->Password = "***"; // GMAIL password
- //End Gmail
- $mail->From = "jankslavik@gmail.com";
- $mail->FromName = "H4NS";
- $mail->Subject = "test";
- $mail->Body ="Zdar";
- //$mail->AddReplyTo("reply@email.com","reply name");//they answer here, optional
- $mail->AddAddress("cassano.re@seznam.cz","name to");
- $mail->IsHTML(false); // send as HTML
- if(!$mail->Send()) {//to see if we return a message or a value bolean
- //echo "Mailer Error: " . $mail->ErrorInfo;
- } //else echo "Message sent!";
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement