このホームページは、RapidWeaverというマックのソフトで構築しています。
このソフトは手軽にホームページを作成できて、なかなか良くできています。このソフトの前は、長いこと、Mac OS9でAdobe PageMillを使っていました。
「メールをこちらから」というフォームでメールを送る設定ができます。これはphpに対応するサーバーが必要です。私は自宅サーバーですので、設定が必要です。
1.Debian Linux 4.0 etchでは、php5を使うことができます。Linuxは、いろいろと作法が面倒なのですが、
2.インストールは
aptitude install php5
途中でエラーがでました。
3.パッケージが新しくなっていて、そのリストを再構築しなければなりません。
apatitude update
これで、いろいろとリストの再構築がされます。
4.改めて、
aptitude install php5
インストールができました。
5.ちゃんと PHP スクリプトが実行できるか確認しましょう。以下の様にして、テスト用 PHP スクリプトを作成します。
~# vi /var/www/apache2-default/info.php
以下の一行を入力。
——————-
< ?php
phpinfo();
?>
——————-
ブラウザから http://サーバIP/apache2-default/info.php にアクセスして PHP に関する情報が表示されればOK!
6.phpはインストールできたので、今度は、phpを通して、メールを送る設定です。メールを送るにはsmtpサーバーが必要です。
/etc/php5/apahte2/php.ini
を編集します。この中の[mail function]を緑(#でコメントアウトします)を赤色に編集します。
——————————————————————
[mail function]
; For Win32 only.
#SMTP = localhost
SMTP =(プロバイダのSMTPサーバーのアドレス)
smtp_port = 25
; For Win32 only.
#;sendmail_from = me@example.com
;sendmail_from = (自分のメールアドレス)
; For Unix only. You may supply arguments as well (default: “sendmail -t -i”).
;sendmail_path =
——————————————————————
7.これでapache2のリスタートです。
/etc/init.d/apache2 restart
8.これでもうまくいきません。「exim4と呼ばれるサービスを再設定すればよいらしい。」との情報があり、試してみます。
——————————————————————
# dpkg-reconfigure exim4-config
Split configuration into small files?
General type of mail configuration: internet site; mail is sent and received directly using SMTP
System mail name: fkmac01.phc.chalmers.se
IP-addresses to listen on for incoming SMTP connections: 127.0.0.1
Other destinations for which mail is accepted:
Domains to relay mail for:
Machines to relay mail for:
Keep number of DNS-queries minimal (Dial-on-Demand)?
——————————————————————
これは私の場合、日本語表示でした。
やっとうまくいきました。