Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
Artur
Imagevue PowerPack
Posts: 510
Joined: 20 May 2011, 03:17

Re: Contac and Red Cross

30 Nov 2014, 04:11

mjau-mjau wrote:
Artur wrote:Mail function is working fine on my server (at least in form like PHPMailer class
May I ask from what application you are using PHPMailer, and what settings you may have applied (smtp etc)? The reason I ask, is because essentially, PHPmailer just uses the standard php mail() function unless you have set it to use SMTP or another specific option.

On your server, the PHP mail() function simply fails. I assume it might have been turned off for security/spam reasons, and they rely on SMTP only. This is why we added this option to Imagevue X2. Here is the basic code in X3 PHP:
Code
if(mail($to, $subject, $message, 'From: ' . $email)) {
    return 'true'; // success!
  } else {
    return 'cannot send from server'; // server mail() fail
}
Sorry for the late reply Karl. I had to make some research because I noticed that many things on my server started work differently.

I have few websites on my server where the mail function is implemented, so I was 100% sure that the basic mail function works. But...
But it indeed won't work anymore and this happened about a month ago. They did some anti-spam protection recently, which they described here.

As about the cache folder issue (what I posted in other topic before) - they have enabled gzip by default (without possibility to turn off). So, basically any app that uses this feature, will actualy compress already compressed informations :roll:

Also... They have now switched to host-cloud hybrid type of servers, what may cause another portion of problems.

I have spoken with them also about all the issues that I noticed recently (not only with X3 unfortunately but also with standard frameworks) and it seems that they have "improved", "secured" and "fixed" :wink: a lot things (things that prevents websites/basic frameworks to work normally), without even inform the end user. This makes me consider to NOT renew the contract with them next year, as I don't like to be forced to correct and re-script ready frameworks that SHOULD works out of the box.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Contac and Red Cross

30 Nov 2014, 04:19

Hi Arthur, just a few comments ...

Regarding the mail function, I think this is something that we will be fixing from our side after I did some research with another X3 user on Bluehost hosting. After just quickly browsing the google-tranlated page you sent me, I believe this is the same issue as in Bluehost, and thus solvable from X3 by explicitly setting a from:header to match the requirement.
Artur wrote:As about the cache folder issue (what I posted in other topic before) - they have enabled gzip by default (without possibility to turn off). So, basically any app that uses this feature, will actualy compress already compressed informations :roll:
Actually, most servers have gzip enabled by default, and in our default htaccess file we are just making sure that it is on. I cannot see that this would create an issue by recompressing already compressed data on the fly ... It could have had an effect on the pre-compressed css/js files we had, but they are currently been disabled until further notice ...

Not sure about other issues ...
 
localhost
Experienced
Posts: 158
Joined: 20 Sep 2011, 07:09

Re: Contac and Red Cross

01 Dec 2014, 01:35

Karl, I have to temporarily removed the [contact] form on my page as my website is on a production mode. Just letting you know just in case you need to test it.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Contac and Red Cross

01 Dec 2014, 02:01

Fix for this is in queue for v0.6 this week ...
 
User avatar
nz-photo
Experienced
Posts: 248
Joined: 06 Dec 2007, 17:26

Re: Contac and Red Cross

01 Dec 2014, 09:42

Hey Karl !
What kind of test could I run to check what's wrong with my mail functionality?
It was working fine so far but seems now to be Out of order.
I think the only change I made was to update to the latest x3 version last week...
Do you know if i could just reupload some files only related to the mailing service ?
Empty your mind, be formless, be shapeless, like water...
www.nz-photo.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Contac and Red Cross

01 Dec 2014, 10:29

@nz-photo: You mean it was working earlier but not any more? We did not change anything in regards to mail at all ... As mentioned in my previous post, I am looking into a few issues with email and I believe I will be able to solve an issue related to security that a few servers have ... and I am guessing the same goes for your server. You would be able to update just a single file to test if it works ... I will re-post here soon ....
 
User avatar
nz-photo
Experienced
Posts: 248
Joined: 06 Dec 2007, 17:26

Re: Contac and Red Cross

01 Dec 2014, 10:40

OK thanks Karl.Indeed actually it was working fine, but not today after i ran a test.
I'm a bit lost about when it was working fine sadly...
Maybe I will upload a fully new beta version (the last one i have) and then check it again tonight..
Have a nice evening Karl !
Empty your mind, be formless, be shapeless, like water...
www.nz-photo.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Contac and Red Cross

01 Dec 2014, 11:10

Just tested your contact page Nikolas, and I diagnosed the output after trying to send: "cannot send from server". That is basically what our script returns when server doesn't like the PHP mail() function, and the same error as a few others are having. I believe it to be a security implementation in regards to a few parameters, and I am looking into it as we speak.

I have been reading up on technical pages of two X3 users hosts, and the issue is mainly related to the send email FROM header parameter. First of all, it can't be set to the visitors email who is sending the email (which would be most practical), and second it needs to be set to an email hosted on the same domain. Will update here shortly ...
Code
if(mail($to, $subject, $message, 'From: ' . $email)) {
  return 'true'; // success!
} else {
  return 'cannot send from server'; // server mail() fail
}
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Contac and Red Cross

01 Dec 2014, 13:15

After doing some research, I have a fix for the contact which I believe should work. Those who want to check please download this file, and overwrite the file extensions/twig.imagevue.inc.php on your server.

Please check, and send me link so I can diagnose

Important!
I believe all these issues are related to the same security implementation on many servers. To be honest, they do make sense in this age of spamming, although it does limit your contact form slightly.

Email@SAMEDOMAIN.com
First of all, in your global settings, you need to make sure your email is on SAME domain as the website is running from. For example email jon@jondoe.com on website http://jondoe.com will work, while jon@hotmail.com on website http://jondoe.com will NOT work. Why? Your server does this because it doesn't want to send emails at all unless the sender is a user on the same domain ... If it sends from an email that is NOT on the domain, then technically speaking it is spoofing the sender-email.

FROM
Therefore, we needed to populate the FROM header in the mail sender, with the email you have in settings, instead of the visitors email. This will of course lead to the fact that the emails you receive from the contact form are actually "from" your email, although we can set a different "reply-to" address that matches the visitors email.

I might be able to add some improvements, but for now let's see if it works ...
 
User avatar
nz-photo
Experienced
Posts: 248
Joined: 06 Dec 2007, 17:26

Re: Contac and Red Cross

01 Dec 2014, 14:31

I have uploaded the new php file then changed my email in settings to one from my server (nz-photo.com)
BUT i still can't manage to get it working : red cross and no email received...
http://nz-photo.com/contact/
Empty your mind, be formless, be shapeless, like water...
www.nz-photo.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Contac and Red Cross

02 Dec 2014, 01:56

I tried a few things directly on your server Nikolas, but the localhost mailer is no working or not enabled ... I am curious, who is the actual hosting company that you are paying? First of all, as it was working earlier, they- or somebody changed something on server ... Second, I found this article related to paralells hosting, which explains something about how to setup localhost mailer:
http://kb.sp.parallels.com/en/117120

However, the above also seems to imply that this is just some generic server software and you need to physically edit a file at disk location which I obviously cant access. These are the reasons we are starting to offer X3 Hosting, setup properly on modern servers. I have been working out a flawless mail() function last 2 days with all correct headers, but it simply doesn't work on your server (anymore).
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Contac and Red Cross

02 Dec 2014, 02:14

I will need to add an SMTP mail option, and I will look into that next week ...
 
User avatar
nz-photo
Experienced
Posts: 248
Joined: 06 Dec 2007, 17:26

Re: Contac and Red Cross

09 Dec 2014, 09:17

Hey Karl ! How you doing ?
Just a reminder to know if you came out with something about this smtp mail feature
to solve the phpmail() issues some have through the hosting services ?
I think it is quite an important features within the gallery itself...

Thanks for the upcoming news :wink:
Nico.
Empty your mind, be formless, be shapeless, like water...
www.nz-photo.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Contac and Red Cross

09 Dec 2014, 09:48

nz-photo wrote:Just a reminder to know if you came out with something about this smtp mail feature
to solve the phpmail() issues some have through the hosting services ?
I think it is quite an important features within the gallery itself...
Working on it right now! In fact I already have SMTP working, but emails are a multi-headed hydra and I need to add a lot of conditions and settings now with all the different mail send methods. SMTP alone requires additional settings host, port, secure, auth, username and password ... I am also adding a mail template that can be edited from panel -> custom/contact/.

It will probably be a few more days because I have a few more issues to solve and features to add for v0.7.
 
User avatar
nz-photo
Experienced
Posts: 248
Joined: 06 Dec 2007, 17:26

Re: Contac and Red Cross

09 Dec 2014, 11:25

Thanks Karl.
I'll follow the updates.
Have a nice evening!
Empty your mind, be formless, be shapeless, like water...
www.nz-photo.com