質問編集履歴
6
問題点の編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,181 +10,11 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
13
|
### 発生している問題・エラーメッセージ
|
18
14
|
|
15
|
+
CentOs7 での環境下において、 Pear インストール時 NET_Socket, NET_SMTP
|
19
16
|
|
20
|
-
|
21
|
-
IE 11では HTTP 500エラー
|
22
|
-
|
23
|
-
Fire FOX, CROME ,EDGE では 空白表示
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
```
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
### 該当のソースコード
|
32
|
-
|
33
|
-
<?php
|
34
|
-
|
35
|
-
//mb_encode_mimeherader用エンコード
|
36
|
-
|
37
|
-
mb_language("japanese");
|
38
|
-
|
39
|
-
mb_internal_encoding("UTF-8");
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
require_once 'Mail.php';
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
//バックエンドの設定
|
48
|
-
|
49
|
-
$params=array(
|
50
|
-
|
51
|
-
'host'=>'smtp.gmail.com',
|
52
|
-
|
53
|
-
'port'=>587,
|
54
|
-
|
55
|
-
'auth'=>true,
|
56
|
-
|
57
|
-
'username'=>'********@gmail.com',
|
58
|
-
|
59
|
-
'password'=>'******',
|
60
|
-
|
61
|
-
//'debug'=>true,
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
);
|
68
|
-
|
69
|
-
//Mailクラスのインスタンス化
|
70
|
-
|
71
|
-
$smtp=Mail::factory('smtp',$params);
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
//メールヘッダの設定
|
76
|
-
|
77
|
-
$headers=array(
|
78
|
-
|
79
|
-
'From' =>'*******@gmail.com',
|
80
|
-
|
81
|
-
'To' => '*********@gmail.com',
|
82
|
-
|
83
|
-
'Subject' => mb_encode_mimeheader("メールの件名")
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
);
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
//送信先アドレスの設定
|
92
|
-
|
93
|
-
$recipients='*******@gmail.com';
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
//メール本文の設定
|
98
|
-
|
99
|
-
$body=mb_convert_encoding("メールの内容","ISO-2022-JP");
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
//メール送信
|
104
|
-
|
105
|
-
print("<pre>");
|
106
|
-
|
107
|
-
$e=$smtp->send($recipients,$headers,$body);
|
108
|
-
|
109
|
-
print("</pre>");
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
if (PEAR::isError($e)){
|
114
|
-
|
115
|
-
//print($e->getMessage());
|
116
|
-
|
117
|
-
print "エラー発生";
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
}
|
122
|
-
|
123
|
-
else{
|
124
|
-
|
125
|
-
//print("{$recipients}宛てにメールを送信しました");
|
126
|
-
|
127
|
-
print "成功";
|
128
|
-
|
129
|
-
}
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
?>
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
$e=$smtp->send($recipients,$headers,$body);
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
の部分で HTTP 500エラー 、又は空白になっている様子です。
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
### 試したこと
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
17
|
+
がインストールできない。
|
156
|
-
|
157
|
-
PHP Pear の再インストール
|
158
|
-
|
159
|
-
【Apach エラーログ】
|
160
|
-
|
161
|
-
「PHP Fatal error: Class 'Net_SMTP' not found in /usr/share/pear/Mail/smtp.php on line 366」 が出ています。
|
162
|
-
|
163
|
-
「[:error] [pid 1731] [client 206.1.14.51:2842] PHP Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /usr/share/pear/Mail/smtp.php on line 365 」も出ています。
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
【PEAR LIST】
|
168
|
-
|
169
|
-
pear list を見ると 確かに Net_SMTPがありません。Pear ダウンロード時に一括でインストールされていないようです。
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
「pear install -a Net_SMTP すると No valid packages found install failed 」でインストールができません。
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
pear install の 直後
|
178
|
-
|
179
|
-
「WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update WARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2"」 の警告がでています
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
「pear/Net_SMTP requires PEAR Installer (version >= 1.10.1), installed version is 1.9.4」 というエラーもでていました。
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
【Pear1.9.4】⇒【Pear1.10.5】に再インストール挑戦していますが、うまくゆきません。
|
188
18
|
|
189
19
|
|
190
20
|
|
@@ -224,438 +54,4 @@
|
|
224
54
|
|
225
55
|
|
226
56
|
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
57
|
初心者の為、申し訳ありませんがご教授願えたらと存じます。
|
244
|
-
|
245
|
-
### 前提・実現したいこと
|
246
|
-
|
247
|
-
CentOs6 Apach2.2 PHP 5.3 Pear Mail 1.4.1 を使用して、Goolgeのアカウントでメール
|
248
|
-
|
249
|
-
を送信していましたが、
|
250
|
-
|
251
|
-
CentOs7 Apach2.4 PHP 5.4.16 Pear Mail 1.4.1 でも同様にメール送信したい。
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
### 発生している問題・エラーメッセージ
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
IE 11では HTTP 500エラー
|
266
|
-
|
267
|
-
Fire FOX, CROME ,EDGE では 空白表示
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
```
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
### 該当のソースコード
|
276
|
-
|
277
|
-
<?php
|
278
|
-
|
279
|
-
//mb_encode_mimeherader用エンコード
|
280
|
-
|
281
|
-
mb_language("japanese");
|
282
|
-
|
283
|
-
mb_internal_encoding("UTF-8");
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
require_once 'Mail.php';
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
//バックエンドの設定
|
292
|
-
|
293
|
-
$params=array(
|
294
|
-
|
295
|
-
'host'=>'smtp.gmail.com',
|
296
|
-
|
297
|
-
'port'=>587,
|
298
|
-
|
299
|
-
'auth'=>true,
|
300
|
-
|
301
|
-
'username'=>'********@gmail.com',
|
302
|
-
|
303
|
-
'password'=>'******',
|
304
|
-
|
305
|
-
//'debug'=>true,
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
);
|
312
|
-
|
313
|
-
//Mailクラスのインスタンス化
|
314
|
-
|
315
|
-
$smtp=Mail::factory('smtp',$params);
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
//メールヘッダの設定
|
320
|
-
|
321
|
-
$headers=array(
|
322
|
-
|
323
|
-
'From' =>'*******@gmail.com',
|
324
|
-
|
325
|
-
'To' => '*********@gmail.com',
|
326
|
-
|
327
|
-
'Subject' => mb_encode_mimeheader("メールの件名")
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
);
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
//送信先アドレスの設定
|
336
|
-
|
337
|
-
$recipients='*******@gmail.com';
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
//メール本文の設定
|
342
|
-
|
343
|
-
$body=mb_convert_encoding("メールの内容","ISO-2022-JP");
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
//メール送信
|
348
|
-
|
349
|
-
print("<pre>");
|
350
|
-
|
351
|
-
$e=$smtp->send($recipients,$headers,$body);
|
352
|
-
|
353
|
-
print("</pre>");
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
if (PEAR::isError($e)){
|
358
|
-
|
359
|
-
//print($e->getMessage());
|
360
|
-
|
361
|
-
print "エラー発生";
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
}
|
366
|
-
|
367
|
-
else{
|
368
|
-
|
369
|
-
//print("{$recipients}宛てにメールを送信しました");
|
370
|
-
|
371
|
-
print "成功";
|
372
|
-
|
373
|
-
}
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
?>
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
$e=$smtp->send($recipients,$headers,$body);
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
の部分で HTTP 500エラー 、又は空白になっている様子です。
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
### 試したこと
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
Fire Wallの無効
|
400
|
-
|
401
|
-
PHP Pear の再インストール
|
402
|
-
|
403
|
-
【Apach エラーログ】
|
404
|
-
|
405
|
-
「PHP Fatal error: Class 'Net_SMTP' not found in /usr/share/pear/Mail/smtp.php on line 366」 が出ています。
|
406
|
-
|
407
|
-
「[:error] [pid 1731] [client 206.1.14.51:2842] PHP Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /usr/share/pear/Mail/smtp.php on line 365」 も出ています。
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
【PEAR LIST】
|
412
|
-
|
413
|
-
pear list を見ると 確かに Net_SMTPがありません。Pear ダウンロード時に一括でインストールされていないようです。
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
「pear install -a Net_SMTP すると No valid packages found install failed 」でインストールができません。
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
pear install の 直後
|
422
|
-
|
423
|
-
「WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update WARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2" 」の警告がでています
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
「pear/Net_SMTP requires PEAR Installer (version >= 1.10.1), installed version is 1.9.4」 というエラーもでていました。
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
【Pear1.9.4】⇒【Pear1.10.5】に再インストール挑戦していますが、うまくゆきません。
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
初心者の為、申し訳ありませんがご教授願えたらと存じます。
|
454
|
-
|
455
|
-
### 前提・実現したいこと
|
456
|
-
|
457
|
-
CentOs6 Apach2.2 PHP 5.3 Pear Mail 1.4.1 を使用して、Goolgeのアカウントでメール
|
458
|
-
|
459
|
-
を送信していましたが、
|
460
|
-
|
461
|
-
CentOs7 Apach2.4 PHP 5.4.16 Pear Mail 1.4.1 でも同様にメール送信したい。
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
### 発生している問題・エラーメッセージ
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
IE 11では HTTP 500エラー
|
476
|
-
|
477
|
-
Fire FOX, CROME ,EDGE では 空白表示
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
```
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
### 該当のソースコード
|
486
|
-
|
487
|
-
<?php
|
488
|
-
|
489
|
-
//mb_encode_mimeherader用エンコード
|
490
|
-
|
491
|
-
mb_language("japanese");
|
492
|
-
|
493
|
-
mb_internal_encoding("UTF-8");
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
require_once 'Mail.php';
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
//バックエンドの設定
|
502
|
-
|
503
|
-
$params=array(
|
504
|
-
|
505
|
-
'host'=>'smtp.gmail.com',
|
506
|
-
|
507
|
-
'port'=>587,
|
508
|
-
|
509
|
-
'auth'=>true,
|
510
|
-
|
511
|
-
'username'=>'********@gmail.com',
|
512
|
-
|
513
|
-
'password'=>'******',
|
514
|
-
|
515
|
-
//'debug'=>true,
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
);
|
522
|
-
|
523
|
-
//Mailクラスのインスタンス化
|
524
|
-
|
525
|
-
$smtp=Mail::factory('smtp',$params);
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
//メールヘッダの設定
|
530
|
-
|
531
|
-
$headers=array(
|
532
|
-
|
533
|
-
'From' =>'*******@gmail.com',
|
534
|
-
|
535
|
-
'To' => '*********@gmail.com',
|
536
|
-
|
537
|
-
'Subject' => mb_encode_mimeheader("メールの件名")
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
);
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
//送信先アドレスの設定
|
546
|
-
|
547
|
-
$recipients='*******@gmail.com';
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
//メール本文の設定
|
552
|
-
|
553
|
-
$body=mb_convert_encoding("メールの内容","ISO-2022-JP");
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
//メール送信
|
558
|
-
|
559
|
-
print("<pre>");
|
560
|
-
|
561
|
-
$e=$smtp->send($recipients,$headers,$body);
|
562
|
-
|
563
|
-
print("</pre>");
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
if (PEAR::isError($e)){
|
568
|
-
|
569
|
-
//print($e->getMessage());
|
570
|
-
|
571
|
-
print "エラー発生";
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
}
|
576
|
-
|
577
|
-
else{
|
578
|
-
|
579
|
-
//print("{$recipients}宛てにメールを送信しました");
|
580
|
-
|
581
|
-
print "成功";
|
582
|
-
|
583
|
-
}
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
?>
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
$e=$smtp->send($recipients,$headers,$body);
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
の部分で HTTP 500エラー 、又は空白になっている様子です。
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
### 試したこと
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
Fire Wallの無効
|
610
|
-
|
611
|
-
PHP Pear の再インストール
|
612
|
-
|
613
|
-
【Apach エラーログ】
|
614
|
-
|
615
|
-
PHP Fatal error: Class 'Net_SMTP' not found in /usr/share/pear/Mail/smtp.php on line 366 が出ています。
|
616
|
-
|
617
|
-
[:error] [pid 1731] [client 206.1.14.51:2842] PHP Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /usr/share/pear/Mail/smtp.php on line 365 も出ています。
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
【PEAR LIST】
|
622
|
-
|
623
|
-
pear list を見ると 確かに Net_SMTPがありません。Pear ダウンロード時に一括でインストールされていないようです。
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
pear install -a Net_SMTP すると No valid packages found install failed でインストールができません。
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
pear install の 直後 WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update WARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2" の警告がでています
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
pear/Net_SMTP requires PEAR Installer (version >= 1.10.1), installed version is 1.9.4 というエラーもでていました。
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
【Pear1.9.4】⇒【Pear1.10.5】に再インストール挑戦していますが、うまくゆきません。
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
初心者の為、申し訳ありませんがご教授願えたらと存じます。
|
5
Net_SMTP Net_Socket インストールインストール不具合
test
CHANGED
File without changes
|
test
CHANGED
@@ -188,6 +188,40 @@
|
|
188
188
|
|
189
189
|
|
190
190
|
|
191
|
+
【PEAR Net_SMTP NET_Socket インストールエラー】
|
192
|
+
|
193
|
+
「[root@localhost ~]# pear install Net_Socket
|
194
|
+
|
195
|
+
WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update
|
196
|
+
|
197
|
+
pear/Net_Socket requires PEAR Installer (version >= 1.10.1), installed version is 1.9.4
|
198
|
+
|
199
|
+
No valid packages found
|
200
|
+
|
201
|
+
install failed」
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
「[root@localhost ~]# pear install -a Net_SMTP
|
206
|
+
|
207
|
+
WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update
|
208
|
+
|
209
|
+
WARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2"
|
210
|
+
|
211
|
+
pear/Net_SMTP requires PEAR Installer (version >= 1.10.1), installed version is 1.9.4
|
212
|
+
|
213
|
+
pear/Net_Socket requires PEAR Installer (version >= 1.10.1), installed version is 1.9.4
|
214
|
+
|
215
|
+
pear/Auth_SASL requires PEAR Installer (version >= 1.10.1), installed version is 1.9.4
|
216
|
+
|
217
|
+
No valid packages found
|
218
|
+
|
219
|
+
install failed」
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
191
225
|
|
192
226
|
|
193
227
|
|
4
「」つけ
test
CHANGED
File without changes
|
test
CHANGED
@@ -368,6 +368,216 @@
|
|
368
368
|
|
369
369
|
【Apach エラーログ】
|
370
370
|
|
371
|
+
「PHP Fatal error: Class 'Net_SMTP' not found in /usr/share/pear/Mail/smtp.php on line 366」 が出ています。
|
372
|
+
|
373
|
+
「[:error] [pid 1731] [client 206.1.14.51:2842] PHP Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /usr/share/pear/Mail/smtp.php on line 365」 も出ています。
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
【PEAR LIST】
|
378
|
+
|
379
|
+
pear list を見ると 確かに Net_SMTPがありません。Pear ダウンロード時に一括でインストールされていないようです。
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
「pear install -a Net_SMTP すると No valid packages found install failed 」でインストールができません。
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
pear install の 直後
|
388
|
+
|
389
|
+
「WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update WARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2" 」の警告がでています
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
「pear/Net_SMTP requires PEAR Installer (version >= 1.10.1), installed version is 1.9.4」 というエラーもでていました。
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
【Pear1.9.4】⇒【Pear1.10.5】に再インストール挑戦していますが、うまくゆきません。
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
初心者の為、申し訳ありませんがご教授願えたらと存じます。
|
420
|
+
|
421
|
+
### 前提・実現したいこと
|
422
|
+
|
423
|
+
CentOs6 Apach2.2 PHP 5.3 Pear Mail 1.4.1 を使用して、Goolgeのアカウントでメール
|
424
|
+
|
425
|
+
を送信していましたが、
|
426
|
+
|
427
|
+
CentOs7 Apach2.4 PHP 5.4.16 Pear Mail 1.4.1 でも同様にメール送信したい。
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
### 発生している問題・エラーメッセージ
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
IE 11では HTTP 500エラー
|
442
|
+
|
443
|
+
Fire FOX, CROME ,EDGE では 空白表示
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
```
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
### 該当のソースコード
|
452
|
+
|
453
|
+
<?php
|
454
|
+
|
455
|
+
//mb_encode_mimeherader用エンコード
|
456
|
+
|
457
|
+
mb_language("japanese");
|
458
|
+
|
459
|
+
mb_internal_encoding("UTF-8");
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
require_once 'Mail.php';
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
//バックエンドの設定
|
468
|
+
|
469
|
+
$params=array(
|
470
|
+
|
471
|
+
'host'=>'smtp.gmail.com',
|
472
|
+
|
473
|
+
'port'=>587,
|
474
|
+
|
475
|
+
'auth'=>true,
|
476
|
+
|
477
|
+
'username'=>'********@gmail.com',
|
478
|
+
|
479
|
+
'password'=>'******',
|
480
|
+
|
481
|
+
//'debug'=>true,
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
);
|
488
|
+
|
489
|
+
//Mailクラスのインスタンス化
|
490
|
+
|
491
|
+
$smtp=Mail::factory('smtp',$params);
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
//メールヘッダの設定
|
496
|
+
|
497
|
+
$headers=array(
|
498
|
+
|
499
|
+
'From' =>'*******@gmail.com',
|
500
|
+
|
501
|
+
'To' => '*********@gmail.com',
|
502
|
+
|
503
|
+
'Subject' => mb_encode_mimeheader("メールの件名")
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
);
|
508
|
+
|
509
|
+
|
510
|
+
|
511
|
+
//送信先アドレスの設定
|
512
|
+
|
513
|
+
$recipients='*******@gmail.com';
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
//メール本文の設定
|
518
|
+
|
519
|
+
$body=mb_convert_encoding("メールの内容","ISO-2022-JP");
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
//メール送信
|
524
|
+
|
525
|
+
print("<pre>");
|
526
|
+
|
527
|
+
$e=$smtp->send($recipients,$headers,$body);
|
528
|
+
|
529
|
+
print("</pre>");
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
if (PEAR::isError($e)){
|
534
|
+
|
535
|
+
//print($e->getMessage());
|
536
|
+
|
537
|
+
print "エラー発生";
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
}
|
542
|
+
|
543
|
+
else{
|
544
|
+
|
545
|
+
//print("{$recipients}宛てにメールを送信しました");
|
546
|
+
|
547
|
+
print "成功";
|
548
|
+
|
549
|
+
}
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
?>
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
$e=$smtp->send($recipients,$headers,$body);
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
|
566
|
+
|
567
|
+
の部分で HTTP 500エラー 、又は空白になっている様子です。
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
### 試したこと
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
Fire Wallの無効
|
576
|
+
|
577
|
+
PHP Pear の再インストール
|
578
|
+
|
579
|
+
【Apach エラーログ】
|
580
|
+
|
371
581
|
PHP Fatal error: Class 'Net_SMTP' not found in /usr/share/pear/Mail/smtp.php on line 366 が出ています。
|
372
582
|
|
373
583
|
[:error] [pid 1731] [client 206.1.14.51:2842] PHP Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /usr/share/pear/Mail/smtp.php on line 365 も出ています。
|
@@ -415,211 +625,3 @@
|
|
415
625
|
|
416
626
|
|
417
627
|
初心者の為、申し訳ありませんがご教授願えたらと存じます。
|
418
|
-
|
419
|
-
### 前提・実現したいこと
|
420
|
-
|
421
|
-
CentOs6 Apach2.2 PHP 5.3 Pear Mail 1.4.1 を使用して、Goolgeのアカウントでメール
|
422
|
-
|
423
|
-
を送信していましたが、
|
424
|
-
|
425
|
-
CentOs7 Apach2.4 PHP 5.4.16 Pear Mail 1.4.1 でも同様にメール送信したい。
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
### 発生している問題・エラーメッセージ
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
IE 11では HTTP 500エラー
|
440
|
-
|
441
|
-
Fire FOX, CROME ,EDGE では 空白表示
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
```
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
### 該当のソースコード
|
450
|
-
|
451
|
-
<?php
|
452
|
-
|
453
|
-
//mb_encode_mimeherader用エンコード
|
454
|
-
|
455
|
-
mb_language("japanese");
|
456
|
-
|
457
|
-
mb_internal_encoding("UTF-8");
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
require_once 'Mail.php';
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
//バックエンドの設定
|
466
|
-
|
467
|
-
$params=array(
|
468
|
-
|
469
|
-
'host'=>'smtp.gmail.com',
|
470
|
-
|
471
|
-
'port'=>587,
|
472
|
-
|
473
|
-
'auth'=>true,
|
474
|
-
|
475
|
-
'username'=>'********@gmail.com',
|
476
|
-
|
477
|
-
'password'=>'******',
|
478
|
-
|
479
|
-
//'debug'=>true,
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
);
|
486
|
-
|
487
|
-
//Mailクラスのインスタンス化
|
488
|
-
|
489
|
-
$smtp=Mail::factory('smtp',$params);
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
//メールヘッダの設定
|
494
|
-
|
495
|
-
$headers=array(
|
496
|
-
|
497
|
-
'From' =>'*******@gmail.com',
|
498
|
-
|
499
|
-
'To' => '*********@gmail.com',
|
500
|
-
|
501
|
-
'Subject' => mb_encode_mimeheader("メールの件名")
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
);
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
//送信先アドレスの設定
|
510
|
-
|
511
|
-
$recipients='*******@gmail.com';
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
//メール本文の設定
|
516
|
-
|
517
|
-
$body=mb_convert_encoding("メールの内容","ISO-2022-JP");
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
//メール送信
|
522
|
-
|
523
|
-
print("<pre>");
|
524
|
-
|
525
|
-
$e=$smtp->send($recipients,$headers,$body);
|
526
|
-
|
527
|
-
print("</pre>");
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
if (PEAR::isError($e)){
|
532
|
-
|
533
|
-
//print($e->getMessage());
|
534
|
-
|
535
|
-
print "エラー発生";
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
}
|
540
|
-
|
541
|
-
else{
|
542
|
-
|
543
|
-
//print("{$recipients}宛てにメールを送信しました");
|
544
|
-
|
545
|
-
print "成功";
|
546
|
-
|
547
|
-
}
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
?>
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
$e=$smtp->send($recipients,$headers,$body);
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
の部分で HTTP 500エラー 、又は空白になっている様子です。
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
### 試したこと
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
Fire Wallの無効
|
574
|
-
|
575
|
-
PHP Pear の再インストール
|
576
|
-
|
577
|
-
【Apach エラーログ】
|
578
|
-
|
579
|
-
PHP Fatal error: Class 'Net_SMTP' not found in /usr/share/pear/Mail/smtp.php on line 366 が出ています。
|
580
|
-
|
581
|
-
[:error] [pid 1731] [client 206.1.14.51:2842] PHP Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /usr/share/pear/Mail/smtp.php on line 365 も出ています。
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
【PEAR LIST】
|
586
|
-
|
587
|
-
pear list を見ると 確かに Net_SMTPがありません。Pear ダウンロード時に一括でインストールされていないようです。
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
pear install -a Net_SMTP すると No valid packages found install failed でインストールができません。
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
pear install の 直後 WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update WARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2" の警告がでています
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
pear/Net_SMTP requires PEAR Installer (version >= 1.10.1), installed version is 1.9.4 というエラーもでていました。
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
【Pear1.9.4】⇒【Pear1.10.5】に再インストール挑戦していますが、うまくゆきません。
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
初心者の為、申し訳ありませんがご教授願えたらと存じます。
|
3
「」つけ
test
CHANGED
File without changes
|
test
CHANGED
@@ -158,6 +158,216 @@
|
|
158
158
|
|
159
159
|
【Apach エラーログ】
|
160
160
|
|
161
|
+
「PHP Fatal error: Class 'Net_SMTP' not found in /usr/share/pear/Mail/smtp.php on line 366」 が出ています。
|
162
|
+
|
163
|
+
「[:error] [pid 1731] [client 206.1.14.51:2842] PHP Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /usr/share/pear/Mail/smtp.php on line 365 」も出ています。
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
【PEAR LIST】
|
168
|
+
|
169
|
+
pear list を見ると 確かに Net_SMTPがありません。Pear ダウンロード時に一括でインストールされていないようです。
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
「pear install -a Net_SMTP すると No valid packages found install failed 」でインストールができません。
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
pear install の 直後
|
178
|
+
|
179
|
+
「WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update WARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2"」 の警告がでています
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
「pear/Net_SMTP requires PEAR Installer (version >= 1.10.1), installed version is 1.9.4」 というエラーもでていました。
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
【Pear1.9.4】⇒【Pear1.10.5】に再インストール挑戦していますが、うまくゆきません。
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
初心者の為、申し訳ありませんがご教授願えたらと存じます。
|
210
|
+
|
211
|
+
### 前提・実現したいこと
|
212
|
+
|
213
|
+
CentOs6 Apach2.2 PHP 5.3 Pear Mail 1.4.1 を使用して、Goolgeのアカウントでメール
|
214
|
+
|
215
|
+
を送信していましたが、
|
216
|
+
|
217
|
+
CentOs7 Apach2.4 PHP 5.4.16 Pear Mail 1.4.1 でも同様にメール送信したい。
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
### 発生している問題・エラーメッセージ
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
IE 11では HTTP 500エラー
|
232
|
+
|
233
|
+
Fire FOX, CROME ,EDGE では 空白表示
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
```
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
### 該当のソースコード
|
242
|
+
|
243
|
+
<?php
|
244
|
+
|
245
|
+
//mb_encode_mimeherader用エンコード
|
246
|
+
|
247
|
+
mb_language("japanese");
|
248
|
+
|
249
|
+
mb_internal_encoding("UTF-8");
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
require_once 'Mail.php';
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
//バックエンドの設定
|
258
|
+
|
259
|
+
$params=array(
|
260
|
+
|
261
|
+
'host'=>'smtp.gmail.com',
|
262
|
+
|
263
|
+
'port'=>587,
|
264
|
+
|
265
|
+
'auth'=>true,
|
266
|
+
|
267
|
+
'username'=>'********@gmail.com',
|
268
|
+
|
269
|
+
'password'=>'******',
|
270
|
+
|
271
|
+
//'debug'=>true,
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
);
|
278
|
+
|
279
|
+
//Mailクラスのインスタンス化
|
280
|
+
|
281
|
+
$smtp=Mail::factory('smtp',$params);
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
//メールヘッダの設定
|
286
|
+
|
287
|
+
$headers=array(
|
288
|
+
|
289
|
+
'From' =>'*******@gmail.com',
|
290
|
+
|
291
|
+
'To' => '*********@gmail.com',
|
292
|
+
|
293
|
+
'Subject' => mb_encode_mimeheader("メールの件名")
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
);
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
//送信先アドレスの設定
|
302
|
+
|
303
|
+
$recipients='*******@gmail.com';
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
//メール本文の設定
|
308
|
+
|
309
|
+
$body=mb_convert_encoding("メールの内容","ISO-2022-JP");
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
//メール送信
|
314
|
+
|
315
|
+
print("<pre>");
|
316
|
+
|
317
|
+
$e=$smtp->send($recipients,$headers,$body);
|
318
|
+
|
319
|
+
print("</pre>");
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
if (PEAR::isError($e)){
|
324
|
+
|
325
|
+
//print($e->getMessage());
|
326
|
+
|
327
|
+
print "エラー発生";
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
}
|
332
|
+
|
333
|
+
else{
|
334
|
+
|
335
|
+
//print("{$recipients}宛てにメールを送信しました");
|
336
|
+
|
337
|
+
print "成功";
|
338
|
+
|
339
|
+
}
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
?>
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
$e=$smtp->send($recipients,$headers,$body);
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
の部分で HTTP 500エラー 、又は空白になっている様子です。
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
### 試したこと
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
Fire Wallの無効
|
366
|
+
|
367
|
+
PHP Pear の再インストール
|
368
|
+
|
369
|
+
【Apach エラーログ】
|
370
|
+
|
161
371
|
PHP Fatal error: Class 'Net_SMTP' not found in /usr/share/pear/Mail/smtp.php on line 366 が出ています。
|
162
372
|
|
163
373
|
[:error] [pid 1731] [client 206.1.14.51:2842] PHP Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /usr/share/pear/Mail/smtp.php on line 365 も出ています。
|
@@ -205,3 +415,211 @@
|
|
205
415
|
|
206
416
|
|
207
417
|
初心者の為、申し訳ありませんがご教授願えたらと存じます。
|
418
|
+
|
419
|
+
### 前提・実現したいこと
|
420
|
+
|
421
|
+
CentOs6 Apach2.2 PHP 5.3 Pear Mail 1.4.1 を使用して、Goolgeのアカウントでメール
|
422
|
+
|
423
|
+
を送信していましたが、
|
424
|
+
|
425
|
+
CentOs7 Apach2.4 PHP 5.4.16 Pear Mail 1.4.1 でも同様にメール送信したい。
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
### 発生している問題・エラーメッセージ
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
IE 11では HTTP 500エラー
|
440
|
+
|
441
|
+
Fire FOX, CROME ,EDGE では 空白表示
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
```
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
### 該当のソースコード
|
450
|
+
|
451
|
+
<?php
|
452
|
+
|
453
|
+
//mb_encode_mimeherader用エンコード
|
454
|
+
|
455
|
+
mb_language("japanese");
|
456
|
+
|
457
|
+
mb_internal_encoding("UTF-8");
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
require_once 'Mail.php';
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
//バックエンドの設定
|
466
|
+
|
467
|
+
$params=array(
|
468
|
+
|
469
|
+
'host'=>'smtp.gmail.com',
|
470
|
+
|
471
|
+
'port'=>587,
|
472
|
+
|
473
|
+
'auth'=>true,
|
474
|
+
|
475
|
+
'username'=>'********@gmail.com',
|
476
|
+
|
477
|
+
'password'=>'******',
|
478
|
+
|
479
|
+
//'debug'=>true,
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
);
|
486
|
+
|
487
|
+
//Mailクラスのインスタンス化
|
488
|
+
|
489
|
+
$smtp=Mail::factory('smtp',$params);
|
490
|
+
|
491
|
+
|
492
|
+
|
493
|
+
//メールヘッダの設定
|
494
|
+
|
495
|
+
$headers=array(
|
496
|
+
|
497
|
+
'From' =>'*******@gmail.com',
|
498
|
+
|
499
|
+
'To' => '*********@gmail.com',
|
500
|
+
|
501
|
+
'Subject' => mb_encode_mimeheader("メールの件名")
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
);
|
506
|
+
|
507
|
+
|
508
|
+
|
509
|
+
//送信先アドレスの設定
|
510
|
+
|
511
|
+
$recipients='*******@gmail.com';
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
//メール本文の設定
|
516
|
+
|
517
|
+
$body=mb_convert_encoding("メールの内容","ISO-2022-JP");
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
//メール送信
|
522
|
+
|
523
|
+
print("<pre>");
|
524
|
+
|
525
|
+
$e=$smtp->send($recipients,$headers,$body);
|
526
|
+
|
527
|
+
print("</pre>");
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
if (PEAR::isError($e)){
|
532
|
+
|
533
|
+
//print($e->getMessage());
|
534
|
+
|
535
|
+
print "エラー発生";
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
}
|
540
|
+
|
541
|
+
else{
|
542
|
+
|
543
|
+
//print("{$recipients}宛てにメールを送信しました");
|
544
|
+
|
545
|
+
print "成功";
|
546
|
+
|
547
|
+
}
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
?>
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
$e=$smtp->send($recipients,$headers,$body);
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
の部分で HTTP 500エラー 、又は空白になっている様子です。
|
566
|
+
|
567
|
+
|
568
|
+
|
569
|
+
### 試したこと
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
Fire Wallの無効
|
574
|
+
|
575
|
+
PHP Pear の再インストール
|
576
|
+
|
577
|
+
【Apach エラーログ】
|
578
|
+
|
579
|
+
PHP Fatal error: Class 'Net_SMTP' not found in /usr/share/pear/Mail/smtp.php on line 366 が出ています。
|
580
|
+
|
581
|
+
[:error] [pid 1731] [client 206.1.14.51:2842] PHP Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /usr/share/pear/Mail/smtp.php on line 365 も出ています。
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
【PEAR LIST】
|
586
|
+
|
587
|
+
pear list を見ると 確かに Net_SMTPがありません。Pear ダウンロード時に一括でインストールされていないようです。
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
pear install -a Net_SMTP すると No valid packages found install failed でインストールができません。
|
592
|
+
|
593
|
+
|
594
|
+
|
595
|
+
pear install の 直後 WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update WARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2" の警告がでています
|
596
|
+
|
597
|
+
|
598
|
+
|
599
|
+
pear/Net_SMTP requires PEAR Installer (version >= 1.10.1), installed version is 1.9.4 というエラーもでていました。
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
【Pear1.9.4】⇒【Pear1.10.5】に再インストール挑戦していますが、うまくゆきません。
|
604
|
+
|
605
|
+
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
|
612
|
+
|
613
|
+
|
614
|
+
|
615
|
+
|
616
|
+
|
617
|
+
|
618
|
+
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
初心者の為、申し訳ありませんがご教授願えたらと存じます。
|
2
Net_SMTPの不備? Pear 最新版インストール?
test
CHANGED
File without changes
|
test
CHANGED
@@ -156,6 +156,52 @@
|
|
156
156
|
|
157
157
|
PHP Pear の再インストール
|
158
158
|
|
159
|
+
【Apach エラーログ】
|
160
|
+
|
161
|
+
PHP Fatal error: Class 'Net_SMTP' not found in /usr/share/pear/Mail/smtp.php on line 366 が出ています。
|
162
|
+
|
163
|
+
[:error] [pid 1731] [client 206.1.14.51:2842] PHP Warning: include_once(Net/SMTP.php): failed to open stream: No such file or directory in /usr/share/pear/Mail/smtp.php on line 365 も出ています。
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
【PEAR LIST】
|
168
|
+
|
169
|
+
pear list を見ると 確かに Net_SMTPがありません。Pear ダウンロード時に一括でインストールされていないようです。
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
pear install -a Net_SMTP すると No valid packages found install failed でインストールができません。
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
pear install の 直後 WARNING: channel "pear.php.net" has updated its protocols, use "pear channel-update pear.php.net" to update WARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2" の警告がでています
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
pear/Net_SMTP requires PEAR Installer (version >= 1.10.1), installed version is 1.9.4 というエラーもでていました。
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
【Pear1.9.4】⇒【Pear1.10.5】に再インストール挑戦していますが、うまくゆきません。
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
159
205
|
|
160
206
|
|
161
207
|
初心者の為、申し訳ありませんがご教授願えたらと存じます。
|
1
コードを全文掲載しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,11 +30,117 @@
|
|
30
30
|
|
31
31
|
### 該当のソースコード
|
32
32
|
|
33
|
+
<?php
|
34
|
+
|
35
|
+
//mb_encode_mimeherader用エンコード
|
36
|
+
|
37
|
+
mb_language("japanese");
|
38
|
+
|
39
|
+
mb_internal_encoding("UTF-8");
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
require_once 'Mail.php';
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
//バックエンドの設定
|
48
|
+
|
49
|
+
$params=array(
|
50
|
+
|
51
|
+
'host'=>'smtp.gmail.com',
|
52
|
+
|
53
|
+
'port'=>587,
|
54
|
+
|
55
|
+
'auth'=>true,
|
56
|
+
|
57
|
+
'username'=>'********@gmail.com',
|
58
|
+
|
59
|
+
'password'=>'******',
|
60
|
+
|
61
|
+
//'debug'=>true,
|
33
62
|
|
34
63
|
|
35
64
|
|
36
65
|
|
66
|
+
|
67
|
+
);
|
68
|
+
|
69
|
+
//Mailクラスのインスタンス化
|
70
|
+
|
71
|
+
$smtp=Mail::factory('smtp',$params);
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
//メールヘッダの設定
|
76
|
+
|
77
|
+
$headers=array(
|
78
|
+
|
79
|
+
'From' =>'*******@gmail.com',
|
80
|
+
|
81
|
+
'To' => '*********@gmail.com',
|
82
|
+
|
83
|
+
'Subject' => mb_encode_mimeheader("メールの件名")
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
);
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
//送信先アドレスの設定
|
92
|
+
|
93
|
+
$recipients='*******@gmail.com';
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
//メール本文の設定
|
98
|
+
|
99
|
+
$body=mb_convert_encoding("メールの内容","ISO-2022-JP");
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
//メール送信
|
104
|
+
|
105
|
+
print("<pre>");
|
106
|
+
|
37
107
|
$e=$smtp->send($recipients,$headers,$body);
|
108
|
+
|
109
|
+
print("</pre>");
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
if (PEAR::isError($e)){
|
114
|
+
|
115
|
+
//print($e->getMessage());
|
116
|
+
|
117
|
+
print "エラー発生";
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
else{
|
124
|
+
|
125
|
+
//print("{$recipients}宛てにメールを送信しました");
|
126
|
+
|
127
|
+
print "成功";
|
128
|
+
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
?>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
$e=$smtp->send($recipients,$headers,$body);
|
142
|
+
|
143
|
+
|
38
144
|
|
39
145
|
|
40
146
|
|