sending email
Posted by: elvisparsley (---.81-166-223.customer.lyse.net)
Date: January 04, 2008 11:23AM

How can I set up WAMP for testing forms that send email results? I'd like to be able to check that all the form data is sent to the approriate email addresses.
thanks.

Options: ReplyQuote
Re: sending email
Posted by: student101 (---.saix.net)
Date: January 04, 2008 02:40PM

What are you using?

PHP ?
or
ASP?

For both you need a smtp type server.
If IIS? enable the mail relay for 127.0.0.1, grant access to it.

There are other mail server types that you can download like argosoft and so on.

Cheers

Options: ReplyQuote
Re: sending email
Posted by: toivo (203.19.130.---)
Date: January 05, 2008 03:46AM

Hi,

You do not necessarily need to run an SMTP server under Windows, as long as you forward the mail messages to an SMTP host somewhere, in your LAN/WAN or outside.

In your application using mail() or phpmailer, cc the message to your own email address mailbox. Very handy and works all right.

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: sending email
Posted by: elvisparsley (---.81-166-223.customer.lyse.net)
Date: January 06, 2008 06:06PM

What do I need to do it? I am new to WAMP and am lost.
Could you tell me what to do, please?
Thanks for your reply.

Options: ReplyQuote
Re: sending email
Posted by: toivo (203.19.130.---)
Date: January 06, 2008 11:20PM

Hi,

The SMTP default settings are in the php.ini file which is in c:\wamp\Apache2\bin for Wamp 5. Look for the line:

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

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

Change 'localhost' to the IP address of the SMTP server you want to send the messages to. The 'sendmail_from' mailbox is the default mailbox for 'Reply-To' in the emails.

Please note that these defaults are only used if the script sending the messages does not override them.

If your script runs in the Command Line Interpreter (CLI) mode, a different php.ini file is being used, usually from the php folder.

If you are planning to use the mail() function in PHP, you have to be pretty sure what you are doing. In other words, if the email addresses are coming from web forms that anyone can enter their details into, you need to scrub the data carefully to make sure the information contains only valid characters and that the email address is in the right format (unfortunately we cannot run under Windows the PHP functions that validate the email domain), and not for example an SQL injection attempt. Do a bit of research into data security in relation to forms and PHP scripts, the time spent will not go wasted.

phpmailer is a mail class which support the MIME formats, HTML messages and file attachments. You can get it from [sourceforge.net].

Regards,

toivo
Sydney, Australia



Edited 1 time(s). Last edit at 01/06/2008 11:25PM by toivo.

Options: ReplyQuote


Sorry, only registered users may post in this forum.