Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( ! extension_loaded( 'openssl' ) ) {
- echo ' no está activada';
- }else{
- $this->load->library("PhpMailerLib");
- $mail = $this->phpmailerlib->load();
- try {
- /*
- //Server settings
- $mail->SMTPDebug = 4; // Enable verbose debug output
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'smtp.ingeniumventures.com'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'contacto@ingeniumventures.com'; // SMTP username
- $mail->Password = 'Pllbn8ch'; // SMTP password
- $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 587; // TCP port to connect to
- */
- $mail->SMTPSecure = "tls";
- $mail->Host='smtp.ingeniumventures.com';
- $mail->Port='587';
- $mail->Username = 'contacto@ingeniumventures.com'; // SMTP account username
- $mail->Password = 'Pllbn8ch';
- $mail->SMTPKeepAlive = true;
- $mail->Mailer = "smtp";
- $mail->IsSMTP(); // telling the class to use SMTP
- $mail->SMTPAuth = true; // enable SMTP authentication
- $mail->CharSet = 'utf-8';
- $mail->SMTPDebug = 4;
- //Recipients
- $mail->setFrom('contacto@ingeniumventures.com', 'Ingenium ventures');
- $mail->addAddress('contacto@ingeniumventures.com', 'Ingenium ventures'); // Add a recipient
- //$mail->addCC('cc@example.com');
- //$mail->addBCC('bcc@example.com');
- //Attachments
- //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
- //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
- //Content
- $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';
- $mail->send();
- echo 'Message has been sent 6';
- } catch (Exception $e) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement