PHP Form Sending Issues (using SendInBlue)
<p>I have a basic PHP contact form which I use on a couple of sites, which sends email using the <a href="http://sendinblue.com" rel="nofollow">SendInBlue</a> API.</p>

<p>My problem is that I have the form working perfectly on 1 site, now I am using the EXACT same code for a second site and just changing the email, name, etc - however when testing it I now get this error:</p>

<blockquote>
  <p>Fatal error: Call to undefined method Mailin::send_email() in
  /URL/contactpage.php on line 71</p>
</blockquote>

<p>FYI, line 71 is:</p>

<blockquote>
  <p>$mailin->send_email($data);</p>
</blockquote>

<p>I have attached the complete code below - this works perfectly on 1 site, but I get this error on my second site.</p>

<p>Any ideas?</p>

<p>Thank you!</p>

<pre><code>&lt;?php

//Email Details for Form Notifications
$email_to =   'Test@test.com'; //the address to which the email will be sent 
$email_to_name     =  'Test';

//Form Fields
$fname     =   $_POST['firstname'];
$lname     =   $_POST['lastname'];
$email    =   $_POST['email'];
$fullmessage    =   $_POST['message'];

//Subject Lines
$subject_to  =   'Test';
$subject_touser  =   'Test';

//URL Redirects
$confirm  =   'TestConfirm';
$errorurl  =    'TestError';

//Validate
$emailval = filter_var( $email, FILTER_VALIDATE_EMAIL );
if ($emailval == false)
{
    header("Location: $errorurl");
} else {

    // The email to us
    $message_to = 'Message here';
    //

    // The email to them
    $message_touser = 'Message here';
    //

    require('Mailin.php');

    //Notification Email
    $mailin = new Mailin('https://api.sendinblue.com/v2.0','MY_KEY');
    $data = array( "to" =&gt; array($email_to=&gt;$email_to_name),
                "cc" =&gt; array($email_to_cc=&gt;$email_to_cc_name),
                "from" =&gt; array($email,$fname),
                "subject" =&gt; $subject_to,
                "html" =&gt; $message_to
    );

    $mailin-&gt;send_email($data);

    //Email to User
    $mailin = new Mailin('https://api.sendinblue.com/v2.0','MY_KEY');
    $data2 = array( "to" =&gt; array($email=&gt;$fname),
                "from" =&gt; array($email_to,$email_to_name),
                "subject" =&gt; $subject_touser,
                "html" =&gt; $message_touser
    );

    $mailin-&gt;send_email($data2);  

    header("Location: $confirm");

}
</code></pre>

<p>?></p>