Author Topic: An unknown error has occurred! message with Send_mail.php  (Read 5196 times)

Offline slartyb

  • Newcomer
  • *
  • Posts: 20
    • View Profile
    • ShutterUP Studios
An unknown error has occurred! message with Send_mail.php
« on: July 22, 2014, 08:38:03 PM »
I'm using PM 5.0 build 15800 on my mac pro black cylinder  :-\

When I export a gallery using the PM Classic template and select send email using PHP (see settings attached) And upload via ftp to a client directory on my server on HostPapa, the images are selected and you hit submit, you get the An unknown error has occurred! message. I've had HostPapa look at the situation wondering if it was something on the server side, and they say the error is somewhere in send_mail.php. Can someone please help me?

Many thanks



[attachment deleted by admin]
« Last Edit: July 23, 2014, 09:40:48 AM by slartyb »

Offline slartyb

  • Newcomer
  • *
  • Posts: 20
    • View Profile
    • ShutterUP Studios
Re: An unknown error has occurred! message with Send_mail.php
« Reply #1 on: August 01, 2014, 08:12:23 AM »
Serioiusly? No takers? At all?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: An unknown error has occurred! message with Send_mail.php
« Reply #2 on: August 01, 2014, 08:16:54 AM »
I have no idea why it would be failing for you.  I also don't know where to begin to solve your problem.

-Kirk

Offline slartyb

  • Newcomer
  • *
  • Posts: 20
    • View Profile
    • ShutterUP Studios
Re: An unknown error has occurred! message with Send_mail.php
« Reply #3 on: August 01, 2014, 08:21:20 AM »
They sent me a test "test_mail.php" script that they said was working. Would it be helpful if I sent it to you for comparison?

[attachment deleted by admin]

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: An unknown error has occurred! message with Send_mail.php
« Reply #4 on: August 01, 2014, 09:53:10 AM »
They sent me a test "test_mail.php" script that they said was working. Would it be helpful if I sent it to you for comparison?

Can you also send me what PM produced for you?

Thanks,

-Kirk

Offline slartyb

  • Newcomer
  • *
  • Posts: 20
    • View Profile
    • ShutterUP Studios
Re: An unknown error has occurred! message with Send_mail.php
« Reply #5 on: August 01, 2014, 10:00:44 AM »

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: An unknown error has occurred! message with Send_mail.php
« Reply #6 on: August 01, 2014, 10:57:00 AM »
When I put your source on my own web server, it functions just fine.  I think you may be receiving an email soon.

-Kirk

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: An unknown error has occurred! message with Send_mail.php
« Reply #7 on: August 01, 2014, 11:14:14 AM »
Try replacing the send_mail.php file with the file I have attached.  It will dump out the parameters that are being passed to 'mail()'.  Paste the results in your message back to me.

Thanks,

-Kirk


[attachment deleted by admin]

Offline slartyb

  • Newcomer
  • *
  • Posts: 20
    • View Profile
    • ShutterUP Studios
Re: An unknown error has occurred! message with Send_mail.php
« Reply #8 on: August 01, 2014, 11:56:01 AM »
Here's what I got.

Mail To:blink@shutterupstudios.com

Subject:Project ID: _2014-06-20_AroundTheHouse

Message: ====================================================== Success, wrote to directory . Download File: ====================================================== ====================================================== Success, wrote to directory . Download File: ====================================================== ----------------------------------------------- Gallery ID ----------------------------------------------- {date} ----------------------------------------------- Number of tagged / maximum allowed ----------------------------------------------- 2 / 10 ----------------------------------------------- List of tagged file names ----------------------------------------------- _2014-06-20_084119.NEF _2014-06-20_084011.NEF ----------------------------------------------- File names with comments -----------------------------------------------

HeadersFrom: PMClassic Gallery Reply-To: info@shutterupstudios.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="5f489991cc32090dc628b19b9ac746d1" --5f489991cc32090dc628b19b9ac746d1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
END

An unknown error has occurred!

Please contact the website administrator.


Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: An unknown error has occurred! message with Send_mail.php
« Reply #9 on: August 01, 2014, 02:12:26 PM »
Try this one (better formatting).  Paste in your results.

[attachment deleted by admin]

Offline slartyb

  • Newcomer
  • *
  • Posts: 20
    • View Profile
    • ShutterUP Studios
Re: An unknown error has occurred! message with Send_mail.php
« Reply #10 on: August 01, 2014, 02:30:55 PM »
This is what came up in the browser... no email sent/received though.

Mail To:blink@shutterupstudios.com

Subject:Project ID: _2014-06-20_AroundTheHouse

Message:
======================================================
Success, wrote to file 'results/selection.txt'.

Download File:
<http://shutterupstudios.com/clientarea/phptestgallery/results/download.php?file=selection.txt>

======================================================

======================================================
Success, wrote to file 'results/code_replacement.txt'.

Download File:
<http://shutterupstudios.com/clientarea/phptestgallery/results/download.php?file=code_replacement.txt>

======================================================
-----------------------------------------------
Gallery ID
-----------------------------------------------
{date}


-----------------------------------------------
Number of tagged / maximum allowed
-----------------------------------------------
2 / 10


-----------------------------------------------
List of tagged file names
-----------------------------------------------
_2014-06-20_084119.NEF
_2014-06-20_084011.NEF


-----------------------------------------------
File names with comments
-----------------------------------------------



Headers:
From: PMClassic Gallery <info@shutterupstudios.com>
Reply-To: info@shutterupstudios.com
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="3dd7e57e2dd2346f7fdb2738570a7107"
--3dd7e57e2dd2346f7fdb2738570a7107
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit


END

An unknown error has occurred!

Please contact the website administrator.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: An unknown error has occurred! message with Send_mail.php
« Reply #11 on: August 01, 2014, 03:21:23 PM »
Can you give this one a try?  (It has an additional sendmail parameter your provider had in the sample script.)

[attachment deleted by admin]

Offline slartyb

  • Newcomer
  • *
  • Posts: 20
    • View Profile
    • ShutterUP Studios
Re: An unknown error has occurred! message with Send_mail.php
« Reply #12 on: August 01, 2014, 03:29:00 PM »
Exactly the same results as last time. Thank you for working with me on this and I apologize for the frustration this is most likely causing you.
What I don't understand is why it works on your server and not on mine. Do you think the php.ini file may have something to do with this?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: An unknown error has occurred! message with Send_mail.php
« Reply #13 on: August 01, 2014, 03:38:32 PM »
Exactly the same results as last time. Thank you for working with me on this and I apologize for the frustration this is most likely causing you.
What I don't understand is why it works on your server and not on mine. Do you think the php.ini file may have something to do with this?

I think your sendmail is configured to only send mail on behalf of the user account that your website is running as.  If you look at the script, I added the "-ftest@....com" part onto it because it was in the sample you sent earlier.  It may be that if you executed their sample it wouldn't work either because the -f parameter needs to refer to the user account that the server is running as.  If you want to send me that information privately, I'll add it into the script and send it back to you for further testing.

-Kirk

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: An unknown error has occurred! message with Send_mail.php
« Reply #14 on: August 01, 2014, 03:42:43 PM »
This one will print out the current user (don't share it publicly, send me a personal message reply.)

[attachment deleted by admin]