質問編集履歴

2

config

2021/05/07 01:11

投稿

Blando
Blando

スコア8

test CHANGED
File without changes
test CHANGED
@@ -40,27 +40,25 @@
40
40
 
41
41
  ```ここに言語を入力
42
42
 
43
+ $config_email=[
43
44
 
45
+ 'smtp_crypto' => 'tls',
44
46
 
45
- 'protocol' => 'smtp',
47
+ "protocol" =>"smtp",
46
48
 
47
- 'smtp_host' => '秘密',
49
+ "smtp_host" => "秘密",
48
50
 
49
- 'smtp_user' => '秘密',
51
+ "smtp_port"=>587,
50
52
 
51
- 'smtp_pass' => '秘密',
53
+ "smtp_user"=>'秘密',
52
54
 
53
- 'smtp_port' => 465,
55
+ "smtp_pass"=>"秘密",
54
56
 
55
- 'mailtype' => 'text',
57
+ 'crlf' => "\r\n",
56
58
 
57
- 'charset' => 'utf-8',
59
+ 'newline' => "\r\n"
58
60
 
59
- 'wordwrap' => TRUE,
60
-
61
- 'smt_timeout'=>'20',
62
-
63
- 'tls'=>TRUE
61
+ ];
64
62
 
65
63
  ```---
66
64
 

1

コード追加

2021/05/07 01:11

投稿

Blando
Blando

スコア8

test CHANGED
File without changes
test CHANGED
@@ -64,6 +64,64 @@
64
64
 
65
65
  ```---
66
66
 
67
+
68
+
69
+ Codeigniter4 を利用しており
70
+
71
+ 以下の関数で送信をしています。
72
+
73
+
74
+
75
+ ```ここに言語を入力
76
+
77
+
78
+
79
+
80
+
81
+ public function Send($send_email,$subject,$message){
82
+
83
+ $email = \Config\Services::email();
84
+
85
+
86
+
87
+ //amazon sesの設定情報が入ります。
88
+
89
+ $email->initialize($config_email);
90
+
91
+
92
+
93
+
94
+
95
+ $email->setFrom($this->my_email, $this->my_email_name_ja);
96
+
97
+
98
+
99
+ $email->setTo($send_email);
100
+
101
+ $email->setReplyTo($this->my_email);
102
+
103
+
104
+
105
+
106
+
107
+ $email->setSubject($subject);
108
+
109
+ $email->setMessage($message);
110
+
111
+ print $send_email;
112
+
113
+
114
+
115
+ $email->send();
116
+
117
+ $data = $email->printDebugger();
118
+
119
+ print_r($data);
120
+
121
+ }
122
+
123
+ ```
124
+
67
125
  以下のエラーがでてきます。
68
126
 
69
127
  You did not specify a SMTP hostname.