Author Topic: E-Mails with SMTP server  (Read 6565 times)

0 Members and 1 Guest are viewing this topic.

Offline franco190453

  • Newbie
  • *
  • Posts: 17
    • View Profile
E-Mails with SMTP server
« on: July 18, 2006, 09:13:08 PM »
I installed successfully the gallery.
I have on my system Moodle, PhpBB2, Joomla, Os-Commerce, Zen-Cart  and Another Gallery.
I have a Mail Server (SurgeMail).
I have Windows XP SP2 Prof.
Programs above have had problems with sending and receiving e-mails; I found a solution for everyone of them via Forums.
With 4Images I had two problems:
1.- the traditional session_start; my solution was to write right above session_start at session.php
     session_save_path('STORE_SESSIONS', 'c:/tmp'); and I created tmp with read and write permission.
2.- when I register with a valid e-mail: Registration goes through the gallery but can not send e-mail.
     when I go to the smtp Logs: can see that a connection is stablished but it is finally rejected with a 501 error code.
     Same thing happens when I try to send an e-mail from the gallery to a user.
3.- My SMTP server has usernames and passwords for all clients.
    At the settings, I did the same thing I have always done for all other programs mentioned above.
Any Ideas.
Will strongly appreciate for a solution.
As a user I have to say that I would be willing to become a businness user and buy a license if and only if this
situation gets solved.
Regards to all.
franco190453
P.S. I thing 4Images is an excellent gallery!!!.
« Last Edit: July 19, 2006, 02:56:12 AM by franco190453 »

Offline franco190453

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: E-Mails with SMTP server
« Reply #1 on: July 19, 2006, 03:45:16 AM »
As of right now, I eliminated the SMTP configuration at the gallery.
Now the gallery is sending mail based on my php.ini file. (Which uses SMTP server)
I get the following error:
Warning: mail(); SMTP server response: 501 syntax: Recipient can not contain space .............C:\Apach\.......\email.php on line 171.
Note: I had the exact same error with Os-commerce and the solution was:
From Similar file
FROM:
return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));
TO:
return mail($to_addr, $subject, $this->output, 'From: ' . $from_addr . $this->lf . 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));
Essentially sending two FROM headers - the first one being compatible with MS mail servers, and the second being read by the email clients for display.
This is a bug in OSCommerce that really should be resolved.
Please look where the solution came above.
Any ideas please: looks to be easy, I think is a simple syntax error; unfortunately I am no php expert!!.
Regards.
« Last Edit: July 19, 2006, 06:46:14 AM by franco190453 »

Offline franco190453

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: E-Mails with SMTP server
« Reply #2 on: July 19, 2006, 04:39:37 AM »
New developments:
To clarify:
Upon registration, a user receives e-mail properly.
from admin to a user, sends e-mail properly.
The problem described recently refers to sendind E_CARDS ONLY; problem persists!!!!!.
Any ideas?
Regards to all.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: E-Mails with SMTP server
« Reply #3 on: July 19, 2006, 04:54:13 AM »
I guess its because your email server does not allow "relay" mail, meaning if "from" is not registered email on the server it will reject it... ecards and emails from members email form probably will not work on such server...
Just for the sake of an experiment, try this:
http://www.4homepages.de/forum/index.php?topic=13607.0
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline franco190453

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: E-Mails with SMTP server
« Reply #4 on: July 19, 2006, 05:33:49 AM »
V@no:
Firstable, I want to thank you for your answer to the post!!!!.
I think you are right.
In view of the fact that most e-mail servers do not accept relaying,
this program should be sending links, not images.
Do you have any idea how to modify this part of the program to be able to send
links not images?.
Being able to, at least, send a link, would do it for me.
Regards.

Offline franco190453

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: E-Mails with SMTP server
« Reply #5 on: July 19, 2006, 05:42:21 AM »
V@no:
Have not been able to try your code.
I can only see and copy the first part.
The second part: I can se the 'from' but can not see nor copy the 'to'.
I think there is a problem with the viewing of that post!.
Can you re-write it for me (The second part only) please!.
I will strongly appreciate.
Regards.
Franco190453

Offline franco190453

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: E-Mails with SMTP server
« Reply #6 on: July 19, 2006, 06:37:42 AM »
V@no:
In reference to your link:
Despite the fact that I could not see part of the code, I did a copy and paste and there it was.
So I tried it and problem persists.
If you look at my error reporting, my mail server is rejecting due to a syntax error only.
I do get a lot of e-mails from Asia "Spam" and my server reports or rather rejects the mail on grounds of "Relaying not permitted"; however, in this case is not a problem of relaying but a Syntax problem.
Any ideas!!!.
Thanks in advance.
P.S. I could supply any additional information required in order to solve this problem.
P.S. on line 171 of email.php is where the function send_mail() is.
Regards.

Offline franco190453

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: E-Mails with SMTP server
« Reply #7 on: July 19, 2006, 08:05:55 AM »
V@no:
I did the following with success.
On the up-left hand corner of a picture, there is a print, copy, e-mail thing.
I clicked on the e-mail thing and can send the picture vìa my default e-mail client.
I sent another picture to the e-mail of admin and I had success. My server did not have any problem receiving pictures from outside.
I will strongly appreciate for a solution with the e-cards or a link to any picture from the e-cards module.
Please, help on this.
Regards.
Franco190453