Setup SMTP Server (Mercury)
- Assign DNS Servers for NIC
- 68.94.156.1
- 68.94.157.1
- Start Mercury
- Windows will prompt for Firewall Blocking
Configure Protocols
- Disable all but two protocols
- Mercury SMTP Server
- Mercury SMTP Relay Client
- Configuration > Mercury core Module > General Tab
- Internet name for this system: localhost
- Disable all but “send copies of all errors to postmaster”
- Check tab “Local Domains” make sure localhost is there
- Close and Save
Edit MercuryS SMTP Server
- Open Configuration > MercuryS SMTP Server > General Tab
- Name = SMTP
- Port 25
- IP Interface = 127.0.01
- Go to Connection Control TAB and add 127.0.0.1 to the list
- Un-check “do not permit SMTP relaying to non-local mail:
- Close and Save
Edit MercuryC SMTP Client
- Open Configuration > MercuryC SMTP Client
- Enter in external SMTP client (smtp.google.com for example) on port 465 with SSL ( or whatever ports are supported )
- Enter your login name and password to that external SMTP server
- novus6 / admin
- Close and Save
Edit PHP.INI
- Add “sendmail_from=postmaster@localhost”
- Stop and Restore Mercury and Apache
feedback.php Form
<html>
<head>
<title>Basic2</title>
</head>
<body>
<form method="post" action="sendmail.php">
Email2: <input name="email" type="text" />
Message:
<textarea name="message" rows="10" cols="30">
</textarea>
<input type="submit" />
</form>
</body>
</html>
sendmail.php
<?php
$email = $_GET['email'] ;
$message = $_GET['message'] ;
mail( "yourname@example.com", "Email Subject", $message, "From: $email" );
print "Congratulations your email has been sent";
?>
Mercury Error Codes
by max11max » 31. July 2006 20:52
rh+
I suggest you check out the data you are sending to the mail server.
You might find the below handy,
max
http://indigo.ie/~mavjop/rfcs/rfc821.html
4.2.1. REPLY CODES BY FUNCTION GROUPS
500 Syntax error, command unrecognized
[This may include errors such as command line too long]
501 Syntax error in parameters or arguments
502 Command not implemented
503 Bad sequence of commands
504 Command parameter not implemented
211 System status, or system help reply
214 Help message
[Information on how to use the receiver or the meaning of a
particular non-standard command; this reply is useful only
to the human user]
220 <domain> Service ready
221 <domain> Service closing transmission channel
421 <domain> Service not available,
closing transmission channel
[This may be a reply to any command if the service knows it
must shut down]
250 Requested mail action okay, completed
251 User not local; will forward to <forward-path>
450 Requested mail action not taken: mailbox unavailable
[E.g., mailbox busy]
550 Requested action not taken: mailbox unavailable
[E.g., mailbox not found, no access]
451 Requested action aborted: error in processing
551 User not local; please try <forward-path>
452 Requested action not taken: insufficient system storage
552 Requested mail action aborted: exceeded storage allocation
553 Requested action not taken: mailbox name not allowed
[E.g., mailbox syntax incorrect]
354 Start mail input; end with <CRLF>.<CRLF>
554 Transaction failed
- Log in to post comments