Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Spam Experts on Blacknight

  • 17-08-2015 4:37pm
    #1
    Registered Users, Registered Users 2 Posts: 1,908 ✭✭✭


    Have php mail() function sending email back to visitor with his/her details on their email address.
    I test it with few test email addresses I had set.
    I test it with few fake names - just used them in email content like that:
    $message = "Application have been received from: ".$firstname." ".$lastname;
    

    Ather 10-20 test emails sent I realised that some names and email addresses are not working - if I use specific pair names/email address, no message is sent!? But other combinations works fine!

    Is there way that specific names/email address pair is halted by some spam-preventing software on hosting server? I use Blacknight and all website email come from 78.153.212.230 which is SpamExpert page and I suspect it is messing with my emails flow?

    My header is standard:
    $headers = 'From: my company <info@my_address.ie>'."\n
    'Reply-To: my company <info@my_adderess.ie>'."\n
    'X-Mailer: PHP/' . phpversion();
    

    Mailing function:
    mail($to, $subject, $message, $headers);
    


Comments

  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    Did you ask blacknight support?

    Who hosts your mail? Do you have anything like sender policy framework (SPF) configured for your domain?

    Are you sure the emails aren't being sent. It's not unusual for a recipient mail server to silently drop mails that look like spam.

    Is there any pattern to the emails that aren't working (all GMail etc).

    EDIT:

    You could also look at using one of the transactional mail providers (like Sendgrid or Mandrill), they're easy to integrate and usually free for low volume users.


  • Registered Users, Registered Users 2 Posts: 1,908 ✭✭✭zom


    I asked support and got some useless advice. I asked them twice and wait for reply now.

    I use simplest Linux Minimus shared hosting. I dont host emails with Blacknight - use other provider. But I sent emails from my php websites, as I did on many other websites before.

    I processed all variable used to sent mail() afterwards (echo them) to see if they are correct. I also checked php error logs and couldn't see anything about mail failure (error_log.processed, error_log.txt).

    I'm not sure about "pattern to the emails" you asked. I just sent simple:
    "Application have been received from:.... Thank you"

    As I am preparing it for further development but stuck with erratic email delivery and would like to solve this before continue.

    I literately filled form with:
    aaaaa@gmail.com and name Tom Cruise
    Mail delivered.
    aaaaa@gmail.com and name Tom Burke
    Mail not delivered.
    aaaaa@gmail.com and name Adam Burke
    Mail delivered.
    aaaaa@gmail.com and name Tom Burke
    Mail not delivered.
    aaaaa@gmail.com and name Tom Burke
    Mail not delivered.
    aaaaa@gmail.com and name Enda Burke
    Mail delivered.
    aaaaa@gmail.com and name Michael Moore
    Mail delivered.
    aaaaa@gmail.com and name Laura Moore
    Mail not delivered.
    aaaaa@gmail.com and name Laura Burke
    Mail delivered.
    aaaaa@gmail.com and name Laura Moore
    Mail not delivered.
    aaaaa@gmail.com and name Laura Moore
    Mail not delivered.
    etc..


  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    But you don't know if the problem is the mail is not being sent or if it's being dropped by Google.

    If the mail is being dropped (silently) by Google, Blacknight aren't going to be able to help you.

    Getting email delivered, particularly if it looks like it might not be legitimate is a job in itself. It looks like your sending multiple emails from the same IP address from different display names. That's quite likely to raise flags with Google.

    Look at the transactional email providers I listed earlier, I think at least one of them offers an SMTP relay so you should only need to change your code in 1 or 2 places.


  • Registered Users, Registered Users 2 Posts: 1,908 ✭✭✭zom


    Thank you Graham for all your replies - my last email was not finished as I got involved with some night actyivity ;-) And I didn't even had a time to say thank you.

    I tried gmail.com and live.ie (microsoft) addresses with the same effect. First of all I started to test them to my company emails but as they were From: / To: on same domain I thought it may be the reason of fails.

    To be honest I feel like an idiot trying to deal with that. I am developer not hacker and I am not very familiar with all that spam security / filtering. If my code don't work and I don't know why, I stuck...


  • Registered Users, Registered Users 2 Posts: 6,284 ✭✭✭Talisman


    If you think it's a spam issue then use mail-tester.com to perform your tests. The site will generate an email address for you to use. Click the "Then check your score" button after you have sent the email. If they don't receive the mail then obviously the email is not being sent.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 6,284 ✭✭✭Talisman


    Just had a look at your code, each line of the headers should be separated with a CRLF (\r\n).
    $headers = 'From: webmaster@domain.ie' . "\r\n" .
    'Reply-To: webmaster@domain.ie' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    


  • Registered Users, Registered Users 2 Posts: 1,908 ✭✭✭zom


    Talisman wrote: »
    Just had a look at your code, each line of the headers should be separated with a CRLF (\r\n).
    $headers = 'From: webmaster@domain.ie' . "\r\n" .
    'Reply-To: webmaster@domain.ie' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    

    For some reason after hosting upgrade to php 5.5.27, \r\n started giving double new line. I had format my emails with \r\n and after upgrade they got extra empty lines for some reason. This was my first thought when got email issue and I removed "r\" from header.


  • Registered Users, Registered Users 2 Posts: 6,284 ✭✭✭Talisman


    That's a strange one.

    If you want to get past the email issue you could use a service provider such as Mailgun, their API is simple to use and is well documented. Their service gives you 10,000 free emails per month.

    Sample code:
    use Mailgun\Mailgun;
    
    $mgClient = new Mailgun('api-key-goes-here');
    $domain = "domainname.ie";
    
    $result = $mgClient->sendMessage("$domain",
      array('from'    => 'Web Form <webform@domainname.ie>',
            'to'      => 'John Doe <john.doe@gmail.com>',
            'subject' => 'Form Submission',
            'text'    => 'Blah, blah, blah!'));
    


  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    Talisman wrote: »
    That's a strange one.

    If you want to get past the email issue you could use a service provider such as Mailgun, their API is simple to use and is well documented. Their service gives you 10,000 free emails per month.

    +1

    Mailgun, sendgrid, mandrill, any of the transactional mail providers. They're all well used to delivering large volumes of email to all of the major mail providers.


  • Registered Users, Registered Users 2 Posts: 7,740 ✭✭✭mneylon


    If you're having issues with a service we provide you should contact our support team or at least provide us with the ticket ID so that we can investigate it further for you (which I already did on our forum)

    We host thousands of websites that send email without any issues, so if you can provide the ticket ID it would be helpful.

    Michele


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,908 ✭✭✭zom


    Blacknight wrote: »
    If you're having issues with a service we provide you should contact our support team

    Michele

    I contact them first Michele, and I didn't get any helpfull advice unfirtunetaly. Last time I checked 28 July service was working perfectly and it should be piece of cake to check what changed on server since then. But for some reason it's not.

    I still didn't get explanation why I can't sent HTML emails anymore there:
    http://www.boards.ie/ttfthread/2057477349

    "It's possible as we do filter the outbound emails" statement is just ridiculous - if you blocked me just let me know. Unless let me send what I have to send.


  • Registered Users, Registered Users 2 Posts: 7,740 ✭✭✭mneylon


    zom wrote: »
    I contact them first Michele, and I didn't get any helpfull advice unfirtunetaly. Last time I checked 28 July service was working perfectly and it should be piece of cake to check what changed on server since then. But for some reason it's not.

    I still didn't get explain why I can't sent HTML emails anymore there:
    http://www.boards.ie/ttfthread/2057477349

    "It's possible as we do filter the outbound emails" statement is just ridiculous - if you blocked me just let me know. Unless let me send what I have to send.

    Please supply the ticket ID as previously requested


  • Registered Users, Registered Users 2 Posts: 1,908 ✭✭✭zom


    Talisman wrote: »
    That's a strange one.

    Yes I know but it happens. Haven't found much about it:
    These mail() function or postfix on debian server interprets "\r\n" as double linebraek (\n\n).

    http://www.xpertmailer.com/forum/viewtopic.php?t=19&sid=6ed0643453ad003e028aea03ebfec8e9


  • Registered Users, Registered Users 2 Posts: 7,740 ✭✭✭mneylon


    zom wrote: »
    "It's possible as we do filter the outbound emails" statement is just ridiculous - if you blocked me just let me know. Unless let me send what I have to send.
    I've asked you to provide the ticket ID more than once.

    There is no way for me to check into this without the ticket ID.


Advertisement