<?
require_once 'phpmailer/class.phpmailer.php';
require_once 'phpmailer/class.smtp.php';


$mail = new PHPMailer();
$mail -> IsSMTP();
$mail -> SMTPDebug  = 1;
$mail -> SMTPAuth    = true;
$mail -> Host        = 'smtp.office365.com';
$mail -> Port        = 25;
$mail -> Username    = 'info@doitinpoland.com';
$mail -> Password    = 'Wuc84938';
$mail -> CharSet     = "UTF-8";
$mail -> SMTPOptions = array(
        'ssl' => array(
                'verify_peer'       => false,
                'verify_peer_name'  => false,
                'allow_self_signed' => true
        )
);

$mail -> AddReplyTo( 'info@doitinpoland.com', 'info@doitinpoland.com' );
$mail -> SetFrom( 'info@doitinpoland.com', 'info@doitinpoland.com' );

$mail -> AddAddress( 'pyziak84@gmail.com', '' );
$mail -> Subject = 'test';
$mail -> Body    = 'test';
$mail -> IsHTML( true );
echo $mail -> Send();