31 thoughts on “Code”

  1. I’m trying to use your WP Random Header on a stock WP 3 with Twenty Ten, and after I activate the plugin, all that is displayed is this:
    array(13) { [0]=> NULL [1]=> NULL [2]=> NULL [3]=> NULL [4]=> NULL [5]=> NULL [6]=> NULL [7]=> NULL [8]=> NULL [9]=> NULL [10]=> NULL [11]=> NULL [12]=> NULL }

    I can see your plugin working on your site, so is there a secret?

    1. Ah, I see the mistake. I have the wrong filename. Thanks for pointing that out. I’m trying to merge that plugin into easy-disable-visual-editor which uses a better approach. I’ll wait to update the readme until I hear back on that process.

  2. At this time I’m writing my own plugin for WordPress which needs to send
    e-mails. The problem is that when I call the wp_mail() function the messeges
    are sent true the standard wordpress function and without using you plugin.

    1. Apologies for the slow response, somehow this slipped through my inbox. I’m not sure what’s going on for you. If you send an email through wp_mail(), as far as I know, WP Mail SMTP should be activated. Unless you’re loading WordPress in a special way that bypasses plugins or something.

  3. Hello,

    Thank you for your WP mail smtp plugin. I’m having problems with my contactt 7 plugin on windows hosting and they recomended I used your plugin. I uploaded it and activated it and then could not get access to my wordpress admin page. The following error appeared:

    Fatal error: Cannot redeclare validate_email() (previously declared in D:\Hosting\6171488\html\classiccarpaints\wp-content\plugins\wp-mail-smtp\wp_mail_smtp.php:349) inD:\Hosting\6171488\html\classiccarpaints\wp-content\themes\mazine\tiadmin\tiadmin.php on line 100

    I had to delete the plugin via FTP (as I had no access to the wordpress admin) in order to get access to wordpress again. Tried installing plugin again. Same error. Can you assist please (I am not a developer, just a graphic designer, so please forgive me if I overlooked something)

    1. It looks like your theme uses the same function name (validate_email) as this plugin. The plugin checks that the function does not exist first, but it looks like your theme does not. I suggest contacting the theme author. If you can show me the code in that file (themes/mazine/tiadmin/tiadmin.php) I can compare it against the plugin and recommend a way forward.

  4. I’m trying to get your smtp email to work with the contact form included with the WP Boldy Theme – http://wordpress.site5.net/boldy/?page_id=8

    My webhost requires smtp authentication on all emails, so I installed your plugin, but it is not working with the sendmail script included with the theme:

    $to = preg_replace(“([\r\n])”, “”, hexstr($_POST[‘receiver’]));
    $from = preg_replace(“([\r\n])”, “”, $_POST[’email’]);
    $subject = “Website contact message from “.$_POST[‘name’];
    $message = $_POST[‘comment’];

    $match = “/(bcc:|cc:|content\-type:)/i”;
    if (preg_match($match, $to) ||
    preg_match($match, $from) ||
    preg_match($match, $message)) {
    die(“Header injection detected.”);
    $headers = “From: “.$from.”\r\n”;
    $headers .= “Reply-to: “.$from.”\r\n”;

    if(mail($to, $subject, $message, $headers))
    echo 1; //SUCCESS
    else {
    echo 2; //FAILURE – server failure
    else {
    echo 3; //FAILURE – not valid email

    die(“Direct access not allowed!”);

    function hexstr($hexstr) {
    $hexstr = str_replace(‘ ‘, ”, $hexstr);
    $hexstr = str_replace(‘\x’, ”, $hexstr);
    $retstr = pack(‘H*’, $hexstr);
    return $retstr;

    Any ideas on how to get this working would be much appreciated!

      1. I have the same problem, but changing mail() to wp_mail doesn’t seem to work..

        Anybody else had this problem? Anybody know how to fix it?

  5. I download, installed and activated the WP Mail SMTP WordPress plugin. When I click the setting box I get the following message.

    You do not have sufficient permissions to access this page.

    Thank you

  6. Just configured (WP-Mail-SMTP) but notice that emails sent to hotmail or outlook is not being received (not in junk mail) works in Yahoo going to check gmail. A solution would appreciated.
    Kind Regards

  7. I have set the plugin as advised on your site, test email works great but when sending an email via the contact form on the site I am presented with this warning.

    Warning: mail() [function.mail]: SMTP server response: 530 SMTP authentication is required. in C:\HostingSpaces\sausal1\etgschool.com\wwwroot\wp-content\themes\elogix\page-contact.php on line 53

    please can you advise

    Many thanks


    1. Apologies for the slow response, missed your comment. Guessing you need to supply a username and password. Are you doing that?

  8. Is it really a good idea to show the SMTP password in the SMTP plugin in clear text? That looks like a massive security issue to me, although I’m no expert. Just wondering about an otherwise awesome plugin.


    PS: Feel free to delete this comment in order to encourage anyone to dig deeper into this.

  9. Hello,

    I’m using your plugin WP Mail SMPT to be able to let messages being sent with the contact form. But I’m receiving an error message that there a 2 To headers.
    Could you please help me solve this issue?

    Best regards,

    Here is the error message:
    > info@atmospherestentsandevents.com
    > Technical details of permanent failure:
    > Google tried to deliver your message, but it was rejected by the server for the
    > recipient domain atmospherestentsandevents.com by mailfilter.hostnet.nl.
    > [].
    > The error that the other server returned was:
    > 550 Messages should have one or no To headers, not 2.
    > —– Original message —–
    > DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
    > d=gmail.com; s=20120113;
    > h=date:to:from:subject:message-id:to:mime-version
    > :content-transfer-encoding:content-type;
    > bh=2/UsK1hkyU66YkhBFSFmE8dUw/6XHYN7s5y2Ah8TWjA=;
    > b=sZ9bMwmW4xJu2ahfE50aj6v6qgrIqGYiIsqCZCiUD9In3w3Iv+0td8xGVMuAGm82ex
    > fKn93/eVvnBhw8Ouym72zYjl5nAHBYg3kpuVJUcT5atFXxYHr4ZK7Z9Khd17/3O5hIG5
    > tewgTi/ugHXE2dEmNLtoE6jOXAhLxWFKFnCa+ytQ4w5a6JyLtkuOk13twUhhbwjvRRvt
    > GGxIPgswUg2MOiafN5rZ+CF1M2KsNuHFumjmtvLEbsYPSC3ytKpjhVxLB2HQwfZJjzPo
    > XC8xjzLggfmCy47j5KMWIeZ5NbD0yKwqXiDtRUI2GQxCrMRwAzh9ETw+SlIcTXT55kEx
    > mAdA==
    > X-Received: by with SMTP id l45mr2370798eef.115.1389725571710;
    > Tue, 14 Jan 2014 10:52:51 -0800 (PST)
    > Return-Path:
    > Received: from atmospherestentsandevents.com (sl12-ch4.shared.hostnet.nl.
    > [])
    > by mx.google.com with ESMTPSA id 1sm3934927eeg.4.2014.
    > for
    > (version=TLSv1 cipher=RC4-SHA bits=128/128);
    > Tue, 14 Jan 2014 10:52:50 -0800 (PST)
    > Date: Tue, 14 Jan 2014 18:52:50 +0000
    > Return-Path: info@imaginedesign.nl
    > To: info@atmospherestentsandevents.com
    > From: Raymon
    > Subject: New contact form received
    > Message-ID:
    > X-Priority: 3
    > X-Mailer: PHPMailer 5.2.4 (http://code.google.com/a/apache-extras.org/p/phpmailer/)
    > To: info@atmospherestentsandevents.com
    > MIME-Version: 1.0
    > Content-Transfer-Encoding: 8bit
    > Content-Type: text/plain; charset=UTF-8

  10. Hi Callum,

    i sent you italian translation and some suggestions via email (the only way I could send you the file).
    I hope that for you it is not a problem …

  11. Hi Callum,

    Just a quick question regarding your WP-Mail-SMTP plug-in. I have version 0.9.4 and have received notification of an update to version 0.9.5 but the changelog only displays uo to 0.9.4. Can you please let me know what the changes between these version are. Thanks.

  12. problem with WP-mail SMTP

    I m getting ERROR as

    Test Message Sent
    The result was:
    The full debugging output is shown below:
    object(PHPMailer)#676 (69) {
    string(5) “5.2.7”
    string(5) “UTF-8”
    string(10) “text/plain”
    string(4) “8bit”
    string(22) “SMTP connect() failed.”
    string(24) “specworld@smartzmail.com”
    string(9) “Specworld”
    string(0) “”
    string(0) “”
    string(48) “WP Mail SMTP: Test mail to veerankianu@gmail.com
    ………so on soo……..

    The SMTP debugging output is shown below:
    SMTP -> ERROR: Failed to connect to server: Connection timed out (110)

    What should i have to do??? Please help me….it could be a great help to me….

  13. hi
    ı use ur plugin smtp
    ı use 2-3 gmail account and just one of them works on 2-3 different sites, why others dont work, ı dont imagine whats the matter 😀

Leave a Reply

Your email address will not be published. Required fields are marked *