{"id":19723821,"url":"https://github.com/schema31/php-ci-mailer","last_synced_at":"2025-02-27T18:44:18.611Z","repository":{"id":62541064,"uuid":"292787024","full_name":"Schema31/php-ci-mailer","owner":"Schema31","description":"Mailer for CodeIgniter","archived":false,"fork":false,"pushed_at":"2020-09-08T13:54:38.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T16:39:35.731Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Schema31.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-04T07:59:18.000Z","updated_at":"2020-09-08T13:53:28.000Z","dependencies_parsed_at":"2022-11-02T15:32:50.476Z","dependency_job_id":null,"html_url":"https://github.com/Schema31/php-ci-mailer","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schema31%2Fphp-ci-mailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schema31%2Fphp-ci-mailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schema31%2Fphp-ci-mailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schema31%2Fphp-ci-mailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Schema31","download_url":"https://codeload.github.com/Schema31/php-ci-mailer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241045481,"owners_count":19899654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T23:23:36.258Z","updated_at":"2025-02-27T18:44:18.582Z","avatar_url":"https://github.com/Schema31.png","language":"PHP","readme":"# php-ci-mailer\n======\n\n[Packagist][link-packagist]\n\nMailer for CodeIgniter.\n\nInstall\n-------\n\nYou can install the library using [composer](https://getcomposer.org/):\n\n```sh\n$ composer require schema31/php-ci-mailer\n```\n\nHow to use\n----------\n\n## Configurations\n\nHere the list of all configuration attributes supported:\n\n|Preference       |Default Value       |Options             |Description|\n|-----------------|--------------------|--------------------|-----------|\n|useragent        |CodeIgniter         |None                |The “user agent”.|\n|protocol         |mail                |mail|sendmail|smtp  |The mail sending protocol.|\n|mailpath         |/usr/sbin/sendmail  |None                |The server path to Sendmail.|\n|smtp_host        |No Default          |None                |SMTP Server Address.|\n|smtp_user        |No Default          |None                |SMTP Username.|\n|smtp_pass        |No Default          |None                |SMTP Password.|\n|smtp_port        |25                  |None                |SMTP Port.|\n|smtp_timeout     |5                   |None                |SMTP Timeout (in seconds).|\n|smtp_keepalive   |FALSE               |TRUE|FALSE          |Persistent SMTP connections.|\n|smtp_crypto      |No Default          |tls|ssl             |SMTP Encryption.|\n|wordwrap         |TRUE                |TRUE|FALSE          |Word-wrap.|\n|wrapchars        |76                  |None                |Character count to wrap at.|\n|mailtype         |text                |text|html \t        |Type of mail.|\n|charset          |$config['charset']  |Character set       |(utf-8, iso-8859-1, etc.).|\n|validate         |FALSE               |TRUE|FALSE          |Whether to validate the email address.|\n|priority         |3                   |1|2|3|4|5           |Email Priority. 1 = highest. 5 = lowest.|\n|crlf             |\\n                  |“\\r\\n”|“\\n”|“\\r” \t|Newline character.|\n|newline          |\\n                  |“\\r\\n”|“\\n”|“\\r”    |Newline character.|\n|bcc_batch_mode   |FALSE               |TRUE|FALSE          |Enable BCC Batch Mode.|\n|bcc_batch_size   |200                 |None                |Number of emails in each BCC batch.|\n|dsn              |FALSE               |TRUE|FALSE          |Enable notify message from server.|\n|from_email       |No Default          |None                |“From” e-mail address.|\n|from_name        |No Default          |None                |“From” display name.|\n|prefix_subject   |No Default          |None                |If you want to set a prefix for your subject|\n\n### Internal configuration\n\nYou can use an array of configurations: \n\n```php\n$config = [];\n$config['protocol'] = 'smtp';// mail, sendmail, smtp\n$config['smtp_host'] = 'smtp_host';// SMTP Server Address.\n$config['smtp_user'] = 'smtp_user';// SMTP Username.\n$config['smtp_pass'] = 'smtp_pass';// SMTP Password.\n$config['smtp_port'] = '25';// SMTP Port.\n$config['mailtype'] = 'html';// text or html\n$config['smtp_timeout'] = '30';// SMTP Timeout (in seconds).\n$config['from_email'] = 'noreply@example.it';\n$config['from_name'] = 'CI MAILER';\n$config['prefix_subject'] = 'Mailer - ';\n\n$mailer = new \\Schema31\\CiMailer\\Mailer($config);\n```\n\n### Configuration file\n\nYou can use the file named \"cemail.php\" in application/config folder and the library loads it automatically: \n\n```php\n$mailer = new \\Schema31\\CiMailer\\Mailer();\n```\n\n## Adding recipients\n\nYou can add a single or multiple recipients (like the \"to\", \"cc\", \"bcc\" recipient) with:\n\n```php\n$mailer = new \\Schema31\\CiMailer\\Mailer();\n\n$mailer-\u003esetSingleTo(\"foo01@bar.com\"); //Single \"to\" recipient\n$mailer-\u003esetSingleCc(\"foo02@bar.com\"); //Single \"cc\" recipient\n$mailer-\u003esetSingleBcc(\"foo03@bar.com\"); //Single \"bcc\" recipient\n```\n\nOr\n\n```php\n$mailer = new \\Schema31\\CiMailer\\Mailer();\n\n$mailer-\u003esetMultipleTo([\"foo01@bar.com\", \"foo0101@bar.com\"]); //Multiple \"to\" recipient: \"foo01@bar.com\" and \"foo0101@bar.com\"\n$mailer-\u003esetMultipleCc([\"foo02@bar.com\", \"foo0202@bar.com\"]); //Multiple \"cc\" recipient: \"foo02@bar.com\" and \"foo0202@bar.com\"\n$mailer-\u003esetMultipleBcc([\"foo03@bar.com\", \"foo0303@bar.com\"]); //Multiple \"bcc\" recipient: \"foo03@bar.com\" and \"foo0303@bar.com\"\n```\n\nOr\n\n```php\n$mailer = new \\Schema31\\CiMailer\\Mailer();\n\n$mailer-\u003esetSingleTo(\"foo01@bar.com,foo0101@bar.com\"); //Multiple \"to\" recipient: \"foo01@bar.com\" and \"foo0101@bar.com\" comma separated\n$mailer-\u003esetSingleCc(\"foo02@bar.com,foo0202@bar.com\"); //Multiple \"cc\" recipient: \"foo02@bar.com\" and \"foo0202@bar.com\" comma separated\n$mailer-\u003esetSingleBcc(\"foo03@bar.com,foo0303@bar.com\"); //Multiple \"bcc\" recipient: \"foo03@bar.com\" and \"foo0303@bar.com\" comma separated\n```\n\n## Printing debbuger message\n\nIf you want to print debug message after the send of the email:\n\n```php\n$mailer = new \\Schema31\\CiMailer\\Mailer();\n\n//...\n\necho $mailer-\u003eprintDebugger();\n```\n\n## Sending an email\n\n```php\n$mailer = new \\Schema31\\CiMailer\\Mailer();\n\n//Method chaining is allowed\n$mailer\n-\u003esetSingleTo(\"foo01@bar.com\")\n-\u003esetSubject(\"Email di prova #\" . uniqid())\n-\u003esetMessage(\"La email di testo\")\n-\u003esend(); //returns true if the email is sent, false otherwise.\n```\n\n[link-packagist]: https://packagist.org/packages/schema31/php-ci-mailer\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschema31%2Fphp-ci-mailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschema31%2Fphp-ci-mailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschema31%2Fphp-ci-mailer/lists"}