mail functions and GD2 support - ??

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Almin
-


Joined: 28 Aug 2004
Posts: 6

PostPosted: Sun Apr 17, 2005 7:48 am    Post subject: mail functions and GD2 support - ?? Reply with quote

Can someone help me to configure propperly a mail function. I run Windows XP Pro and in my php.ini file there is :


[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

I don't know how to configure mail function for the porpose of testing php formmail script on my local mashine. On my webhost's linux server I use my domain for sendmail, but what to use on my PC ? And which one to use : SMTP or sendmail, what is the differance?

My next quesstion is how to enable ( or add) GD2 support for inline JPEG thumbnails in PHP ?

Almin
_________________
Almin
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Apr 17, 2005 1:43 pm    Post subject: Re: mail functions and GD2 support - ?? Reply with quote

Almin,

Since you're on Windows, your should use SMTP. PHP will directly connect to the outgoing mail server to send messages. In UNIX systems, sendmail is a command line program that does exactly the same thing (and it is usually preconfigured by the system admin so you never need to tell it which SMTP server to use.)

Set the parameter SMTP to the name of the SMTP server of your ISP (the same one you have configured for outgoing emails in your mail program - e.g. Outlook).

Set sendmail_from to your email address.

To enable GD2 support, you should install the PHP GD2 extension and uncomment in php.ini the line:

Code:
;extension=php_gd.dll


If you want to avoid all the hassle of GD2 installation, download our preconfigured PHP 5 package from http://www.aprelium.com/abyssws/php5win.html . It comes with all the extensions and has GD2 support enabled by default.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
olivierp
-


Joined: 23 Apr 2004
Posts: 54
Location: Montreal, Qc

PostPosted: Sat May 07, 2005 10:58 pm    Post subject: Reply with quote

Hi !

I was able to send mail with php and a form with the previous version of php.
I've installed php5 and mysql as explained by Aprelium and tried different scripts using php. I was not able to send the mail.

My php.ini is setup as my outlook express is for what regards the smtp server, the port (25) and the send from email address (myemail@address.com).

I verified with my internet provider if they allow those scripts, they do.

Of course, I made sure my email was working.

Here is the php script [taken from a post in the forum]
Quote:
<?
mail($_POST['email'],$_POST["subject"], $_POST["body"],'') or die("Mail could not be sent");
?>


Here is the form
Quote:
<form action="sendmail.php" method="post">
Email: <input type="text" name="email"><br>
Subject: <input type="text" name="subject"><br>
Body: <input type="text" name="body"><br>
<input type="submit" name="Submit" value="Submit">
</form>


The script returns the die message
Quote:
Mail could not be sent


Your help will be greatly apreciated.
Thanks

Oli
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun May 08, 2005 1:03 pm    Post subject: Reply with quote

olivierp,

Try using the following code to have the full error message displayed:

Quote:
<?
mail($_POST['email'],$_POST["subject"], $_POST["body"],'') ;
?>


What is it?

Later you can add the or die(....); line when debugging is over.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
olivierp
-


Joined: 23 Apr 2004
Posts: 54
Location: Montreal, Qc

PostPosted: Mon May 09, 2005 6:34 pm    Post subject: Reply with quote

Thanks.

The sendmail.php opens but displays a blank page. No errors.
I did not receive the email.

Any idea why... ?

Oli
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue May 10, 2005 4:42 pm    Post subject: Reply with quote

olivierp wrote:
Thanks.

The sendmail.php opens but displays a blank page. No errors.
I did not receive the email.

Any idea why... ?

Oli

Is there an error message in log/cgi.log??
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
olivierp
-


Joined: 23 Apr 2004
Posts: 54
Location: Montreal, Qc

PostPosted: Tue May 10, 2005 5:03 pm    Post subject: Reply with quote

Yes there is,
Quote:
CGI: ["C:\Program Files\ActiveHTML\AHTML.exe" freeASPUpload.asp ] URI: /uploads/freeASPUpload.asp Broken pipe
CGI: ["C:\Program Files\ActiveHTML\AHTML.exe" freeASPUpload.asp ] URI: /uploads/freeASPUpload.asp Broken pipe


I've reinstalled ActiveHTML a few days ago for another 45 days.
There is nothing else in the log file.

Thanks
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed May 11, 2005 12:51 pm    Post subject: Reply with quote

olivierp,

So we have no clue about the cause of the problem. Can you send your php.ini, abyss.conf, and the script files to support@aprelium.com ? Please do not forget to add a reference to this forum message.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
olivierp
-


Joined: 23 Apr 2004
Posts: 54
Location: Montreal, Qc

PostPosted: Wed May 11, 2005 5:07 pm    Post subject: Reply with quote

I sent you the info with a link to this post...

Once again, thanks for your effort !

Oli
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group