• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Send Outlook 2010 email using PHP

phpemailoutlook


PHP Snippet 1:

if (!defined("olMailItem")) {define("olMailItem",0);}
$oApp  = new COM("Outlook.Application") or die('error');
$oMsg = $oApp->CreateItem(olMailItem);
$oMsg->Recipients->Add("[email protected]");
$oMsg->Subject=$subject;
$oMsg->Body=$message;
$oMsg->Save();
$oMsg->Send();

PHP Snippet 2:

<?php

PHP Snippet 3:

[COM_DOT_NET]
extension=php_com_dotnet.dll

Related Snippets

image source not readable

How do I get friend list from Friends table with counts of friends of my friends

"Notice: Undefined variable", "Notice: Undefined index", "Warning: Undefined array key", and "Notice: Undefined offset" using PHP

file_put_content...fail to open stream:Permission denied in Laravel 5

ConstraintViolationListInterface to Exception in Symfony

Malformed MIME header error in Symfony 5.3

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

Not able to override collapsible.js in magento 2

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

Handle error for duplicate entries - PHP/MySQL

Doctrine 2 mapping referencing unique key

Send same name multiple checkbox values via ajax

Prevent blank space in pdf pages (DomPdf)

The "client_reference_id" argument is not passed

PHP contact form configuration [duplicate]

About Contact Privacy policy Terms and conditions