Apache Mail Send Configuration

Source: Internet
Author: User
I want to send mail via php, download the Apache-james-2.3.2.tar, unzip and click Run.bat seconds back what is the situation? If any great God has a better way to configure the mail server, please advise, thank you first.


Reply to discussion (solution)

Http://wenku.baidu.com/link?url= akmpzxzum0trtmsqpkwiqegyop-pnm1-kqkls0y8aawjxei2ngpqpdmeatpzovoswkapziwbsrs50lctmnxuueioeqkzgnm0ghfg8ohvi7e

I've seen that, but there's no install file in the James\bin folder, but thank you.


James Installation and Configuration

First, Installation:
1. Environmental requirements:
Installed Java platform, version j2sdk1.4.2, environment variable java_home set to C:\j2sdk1.4.2;
2. Download and run:
Download a compressed file from Apache website james-2.1-bin.zip, size 4.44M, unzip the package to C:\James\james-2.1.
The operation is divided into two ways: the foreground runs directly and runs as a background service;
1> Front desk directly run:
Run Run.bat under C:\James\james-2.1\bin
This is going to appear:
Using phoenix_home:c:\james\james-2.1
Using phoenix_tmpdir:c:\james\james-2.1\temp
Using java_home:c:\j2sdk1.4.2
Phoenix 4.0.1
James 2.1

Remote Manager Service started plain:4555

POP3 Service started plain:110

SMTP Service started plain:25

NNTP Service Disabled

Fetch POP Disabled
This means that the James Mail service is turned on, but the console window cannot be closed under window, and the mail service will stop. To overcome this disadvantage, you must have the James Mail service run as a background service.
To stop the foreground run press CTRL + C, the following appears:

JVM exiting abnormally. Shutting down Phoenix.

Terminate the batch operation (y/n)?

2> Background Service run:

Copy the wrapper.conf from the C:\James\james-2.1\conf directory to C:\James\james-2.1\bin that contains the Wrapper.exe directory and run:

Wrapper.exe-i C:\James\james-2.1\bin\wrapper.conf

Then turn on the service or restart in the Control Panel.
Uninstall Background service:

To C:\James\james-2.1\bin that contains the Wrapper.exe directory, run:

Wrapper.exe-r C:\James\james-2.1\bin\wrapper.conf

3.

Second, the configuration:

1> Server-side configuration (the name of the mail server is assumed to be called Emailserver, Server Admin name Admin)

First stop the Open James Mail Service, and then open the file C:\James\james-2.1\apps\james\SAR-INF\config.xml.

In the config. ins file, locate Postmaster@localhost, change this to Admin@emailserver, and find the


-

-

-

-

-
localhost



localhost, change the item to Emailserver. This allows other machines to access the mail system as well.
DNS configuration: Locate the above file The following segments in the paragraph:
-
-
-
-
-
127.0.0.1



False



Fill in the IP address of the DNS server with the location of 127.0.0.1;
To modify the administrator password:

Locate the paragraph in the ibid file, as in the following procedure

-

-
-



Modify the default user name root and password root to the desired value
Modify the Telnet Manager login port: (default = 4555)

Found in the ibid file section below the port below the procedure section

-

4555

-

- Comment out, open it; remember to





Use Comment out;

By modifying it, we changed the storage medium of the user information from file to DB, Refers to the structure of data tables in DB and related database information.
Fourth step: Still config. s, find Item, the default content is empty and the content is modified to:


Org.gjt.mm.mysql.Driver
Jdbc:mysql://127.0.0.1/mail
Root

20



or open an instance of the file below the Comments

Refers to MySQL's JDBC driver, note that the default It is problematic to change the path to Driver.class in the MySQL driver, namely:

Com.mysql.jdbc.Driver
Refers to the database access path, after the IP mail that is MySQL new database name, followed by the user name, password and maximum number of connections.
When it starts again, James will automatically create a table for the user in the mail database.
Now, the database configuration is complete, start James, if normal, please add a new user via Telnet, such as AddUser Holen 123456, and then check the mail database in MySQL, there will be a table users, which is James according to file:/ Created by the/conf/sqlresources.xml content.

With the above configuration, the user information of James can be saved in the database.

Note: Changes to the previous account will be lost!







First, FAQ

1. When you start James, you are prompted POP3 or SMTP is not available?
Please check to see "Administrative Tools?> Service" Inside, is not started the other mail server, has been 110 or 25 ports occupied.

Instance:

James the front desk is running directly with an error:

ERROR 2005-08-25 08:58:38.642 [Phoenix.] (): Component named "SmtpServer" failed to pass through the initialization stage. (Reason:java.net.BindException:Address already in use:jvm_bind).

ERROR 2005-08-25 08:58:38.652 [Phoenix.] (): There was a error running phase "startup" for Block named "SmtpServer". (Reason:component named "SmtpServer" failed to pass through the initialization stage. (Reason:java.net.BindException:Address already in use:jvm_bind).).

Org.apache.excalibur.containerkit.lifecycle.LifecycleException:Component named "SmtpServer" failed to pass through The initialization stage. (Reason:java.net.BindException:Address already in use:jvm_bind).

Reason:

The James default setting does not allow two mail server processes to run on the same machine. Must turn off the other!



Detection method:

Under the console interface:

d:> Telnet Host name 25 (or 110)

If you can log in, the

220 Host name Microsoft ESMTP MAIL Service, version:6.0.2600.1106 ready at Thu,

2005 14:14:36 +0800

Indicates that a mail server is already running on this machine.



Solve:

Check the services running on Windows:

Service for cross-network e-mail messages Simple Mail Transfer Protocol (SMTP), whether to start

If it starts off!

2, Java_home can not find?

Please specify Java_home in Run.bat, and if not, add a?> in the "My Computer?> system?> Advanced java_home environment variable".

3, the server starts normally, but the client cannot send and receive mail?

Please check that the client configuration is normal, as mentioned above, in addition, please check the "config" under James to change the machine name to localhost.

4. After modifying the database storage, James startup error:

The database driver is generally wrong. Check it out.


Org.gjt.mm.mysql.Driver
Jdbc:mysql://127.0.0.1/mail
Root

20


Of Org.gjt.mm.mysql.Driver Whether the

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.