Stefanowitsch Posted October 27, 2019 Share Posted October 27, 2019 Hello! I am testing some forms and get an error when using the replyToName() method: Notice: Undefined index: replyToName in /XXX/XXX/Sites/processwire-new/wire/core/WireMail.php on line 319 --- I took a look at the documentation: https://processwire.com/api/ref/wire-mail/reply-to/ From the documentation I get the information that I CAN use a second argument - the "name". But it is optional. In my form code I don't do that. I just use the sender e-mail address as a single argument. But why is this error occuring? When I use a second argument - any string - there are no errors at all. Link to comment Share on other sites More sharing options...
kixe Posted October 28, 2019 Share Posted October 28, 2019 @Stefanowitsch Please post a code snippet and your ProcessWire version, otherwise it is difficult to reproduce the error. Link to comment Share on other sites More sharing options...
Stefanowitsch Posted October 28, 2019 Author Share Posted October 28, 2019 I am using PW Version 3.0.98 together with WireMailSMTP 0.4.2. My form code: $mail->to($toEmail); $mail->from('mailer@site.de'); $mail->replyTo($fromEmail); $mail->subject('Neue Nachricht über das Kontaktformular'); $mail->bodyHTML ($message); $mail->logActivity("mail sent"); $numSent = $mail->send(); The variable $fromEmail contains the address that was given in the form. I get this error:Notice: Undefined index: replyToName in /XXX/XXX/Sites/processwire-new/wire/core/WireMail.php on line 319 The mail is sent successfully though. This works fine: $mail->replyTo($fromEmail, 'foo'); But again, the second argument is optional. I don't want to use it. Link to comment Share on other sites More sharing options...
teppo Posted October 29, 2019 Share Posted October 29, 2019 Moderator note: this thread was moved to "General Support". Modules section is intended for dedicated third party module support threads only, and this question is about a built-in core feature. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now