PHP code example of sinevia / php-library-contact-as-a-service
1. Go to this page and download the library: Download sinevia/php-library-contact-as-a-service library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sinevia / php-library-contact-as-a-service example snippets
$response = Sinevia\ContactAsAService::send([
'From' => '[email protected]',
'To' => '[email protected]',
'Cc' => '[email protected]',
'Bcc' => '[email protected]',
'Text' => 'Text',
'Html' => 'Html',
'Subject' => 'Subject',
'Origin' => 'Name of Contact Form',
]);
if ($response['status'] == "success") {
$message = 'Your request was successfully received. Before we process it further, check your email and click the confirmation link we have sent to you!';
} else {
$message = 'Your request failed to be send. Please try again later!';
}