Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'phpmailertesting/PHPMailerAutoload.php';
- $mail = new PHPMailer;
- //$mail->SMTPDebug = 3; // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'send.one.com'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'myemailhidden'; // SMTP username
- $mail->Password = 'mypasswordhidden'; // SMTP password
- $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 465; // TCP port to connect to
- $mail->From = 'myemailhidden';
- $mail->FromName = 'My Name';
- $mail->addAddress('example@example.com'); // Name is optional
- $mail->addCC('cc@example.com');
- $mail->addBCC('bcc@example.com');
- //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
- //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = 'Here is the subject';
- $mail->Body = 'This is the HTML message body <b>in bold!</b>';
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent';
- }
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'mailout.one.com'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = false; // Authentication must be disabled
- $mail->Username = 'myemailhidden';
- $mail->Password = ''; // Leave this blank
- $mail->Port = 25; // TCP port to connect to
- $mail->isSMTP();
- $mail->Host = 'mailout.one.com';
- $mail->SMTPAuth = false; // disable SMTP authentication
- $mail->Username = '[your one.com-email]';
- $mail->Password = '[your one.com-email password]';
- $mail->SMTPSecure = ''; // leave this blank!
- $mail->Port = 25;
- <?php
- require 'PHPMailerAutoload.php';
- $mail = new PHPMailer;
- //$mail->SMTPDebug = 3;
- $mail->isSMTP();
- $mail->Host = "mailout.one.com";
- $mail->SMTPAuth = false;
- $mail->Port = 25;
- $mail->From = 'your@domain.se';
- $mail->FromName = 'Mailer';
- $mail->addAddress('sendtothis@domain.se');
- $mail->addReplyTo('ireply@domain.se', 'Information');
- $mail->addBCC('bcc@example.com');
- $mail->isHTML(true);
- $mail->Subject = 'Here is the subject';
- $mail->Body = 'hejehej';
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- //echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent, ja e fan inte tom';
- } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement