Skip to content

'Email address is invalid' on unsubscribe?

bobbob
edited October 2017 in Troubleshooting

I used the <unsubscribe>Unsubscribe here</unsubscribe> tag in the html content of a newsletter and when i tried the link loads a page with this message "Email address is invalid."

The link is goes to is : (domain and email changed)
http://sendy.mydomain.com/unsubscribe/someuser@somedomain.com/1/1
the email is valid and in a list, that got used to send the email, so it does exist in sendy.

Any idea what could create this error ?

Comments

  • BenBen
    edited February 2018

    Hi,

    There may be an issue with your server’s openssl library causing a problem decrypting the openssl encrypted email address.

    Please see the following:

    • It's either your server does not have openssl library installed
    • Or your PHP and CLI PHP is not running on version 5.3 and above

    Also, another user who had the same error previously said this:

    It looks like we’ve figured it out.
    The domain had a line in the .htaccess file that made it use php 5.2
    AddType application/x-httpd-php52 .php5 .php4 .php .php3 .php2 .phtml
    We have removed this line and now sendy seems to be working fine!

    Please check that the .htaccess file in Sendy’s directory and the root directory does not have the following line:

    AddType application/x-httpd-php52 .php5 .php4 .php .php3 .php2 .phtml

    Or try using the curl version of your cron job command, eg:

    curl -L -s http://your_sendy_installation_url/scheduled.php > /dev/null 2>&1

    Thanks.

    Best regards,
    Ben

  • i checked and it's not the problem.

    here is what i have in the logs : PHP Notice: Undefined variable: unsubscribed_url in /xxxxx/sendy/unsubscribe.php on line 299. it's a notice only so it should not be a problem. Still don't know what this fails, will need to debug the all code to find out ...

  • It seems that the code expects encrypted email ? PHP openssl_decrypt is not available on this server so unsubscribe or subscribe do not work

    the problem seems to be here :
    //check if email is passed in as an email address instead of encrypted string
    $validator = new EmailAddressValidator;
    if ($validator->check_email_address($email))
    {
    if($return_boolean=='true')
    {
    echo 'Invalid email address.';
    exit;
    }
    else $feedback = _('Email address is invalid.');
    }

  • BenBen
    edited December 2017

    That's correct. I just checked your phpinfo and don't see openssl installed on your server.

    Please install openssl module on your server or contact your hosting support to do so. See → https://sendy.co/forum/discussion/2858/emails-and-ids-in-links-not-encrypted/p1. That will resolve your issue.

    Best regards,
    Ben

  • bobbob
    edited December 2017

    ok thx it worked, now i get proper encryption.

This discussion has been closed.