getgrav / grav-plugin-email

Grav Email Plugin
http://getgrav.org
MIT License
37 stars 29 forks source link

Expected response code 250 but got code "", with message "" #73

Closed zaszlo closed 4 years ago

zaszlo commented 6 years ago

Config:

enabled: true
from: my@gmail.com
to: my@gmail.com
mailer:
  engine: smtp
  smtp:
    server: smtp.sendgrid.net
    port: 587
    encryption: tls
    user: 'SiteContactForm'
    password: 'key...'
from_name: Me
to_name: Me
content_type: text/html
debug: false

Strack trace:

 Swift_TransportException
…
/user
/plugins
/email
/vendor
/swiftmailer
/swiftmailer
/lib
/classes
/Swift
/Transport
/AbstractSmtpTransport.php
383
28
Swift_Transport_AbstractSmtpTransport
_assertResponseCode
…
/user
/plugins
/email
/vendor
/swiftmailer
/swiftmailer
/lib
/classes
/Swift
/Transport
/AbstractSmtpTransport.php
281
27
Swift_Transport_AbstractSmtpTransport
executeCommand
…
/user
/plugins
/email
/vendor
/swiftmailer
/swiftmailer
/lib
/classes
/Swift
/Transport
/EsmtpTransport.php
270
26
Swift_Transport_EsmtpTransport
executeCommand
…
/user
/plugins
/email
/vendor
/swiftmailer
/swiftmailer
/lib
/classes
/Swift
/Transport
/Esmtp
/Auth
/LoginAuthenticator.php
46
25
Swift_Transport_Esmtp_Auth_LoginAuthenticator
authenticate
…
/user
/plugins
/email
/vendor
/swiftmailer
/swiftmailer
/lib
/classes
/Swift
/Transport
/Esmtp
/AuthHandler.php
176
24
Swift_Transport_Esmtp_AuthHandler
afterEhlo
…
/user
/plugins
/email
/vendor
/swiftmailer
/swiftmailer
/lib
/classes
/Swift
/Transport
/EsmtpTransport.php
334
23
Swift_Transport_EsmtpTransport
_doHeloCommand
…
/user
/plugins
/email
/vendor
/swiftmailer
/swiftmailer
/lib
/classes
/Swift
/Transport
/AbstractSmtpTransport.php
118
22
Swift_Transport_AbstractSmtpTransport
start
…
/user
/plugins
/email
/vendor
/swiftmailer
/swiftmailer
/lib
/classes
/Swift
/Mailer.php
79
21
Swift_Mailer
send
…
/user
/plugins
/email
/classes
/Email.php
104
20
Grav
\Plugin
\Email
\Email
send
…
/user
/plugins
/email
/email.php
95
19
Grav
\Plugin
\EmailPlugin
onFormProcessed
…
/vendor
/symfony
/event-dispatcher
/EventDispatcher.php
184
18
call_user_func
…
/vendor
/symfony
/event-dispatcher
/EventDispatcher.php
184
17
Symfony
\Component
\EventDispatcher
\EventDispatcher
doDispatch
…
/vendor
/symfony
/event-dispatcher
/EventDispatcher.php
46
16
Symfony
\Component
\EventDispatcher
\EventDispatcher
dispatch
…
/vendor
/rockettheme
/toolbox
/Event
/src
/EventDispatcher.php
23
15
RocketTheme
\Toolbox
\Event
\EventDispatcher
dispatch
…
/system
/src
/Grav
/Common
/Grav.php
288
14
Grav
\Common
\Grav
fireEvent
…
/user
/plugins
/form
/classes
/form.php
615
13
Grav
\Plugin
\Form
post
…
/user
/plugins
/form
/form.php
188
12
Grav
\Plugin
\FormPlugin
onPagesInitialized
…
/vendor
/symfony
/event-dispatcher
/EventDispatcher.php
184
11
call_user_func
…
/vendor
/symfony
/event-dispatcher
/EventDispatcher.php
184
10
Symfony
\Component
\EventDispatcher
\EventDispatcher
doDispatch
…
/vendor
/symfony
/event-dispatcher
/EventDispatcher.php
46
9
Symfony
\Component
\EventDispatcher
\EventDispatcher
dispatch
…
/vendor
/rockettheme
/toolbox
/Event
/src
/EventDispatcher.php
23
8
RocketTheme
\Toolbox
\Event
\EventDispatcher
dispatch
…
/system
/src
/Grav
/Common
/Grav.php
288
7
Grav
\Common
\Grav
fireEvent
…
/system
/src
/Grav
/Common
/Processors
/PagesProcessor.php
24
6
Grav
\Common
\Processors
\PagesProcessor
process
…
/system
/src
/Grav
/Common
/Grav.php
132
5
Grav
\Common
\Grav
Grav
\Common
\{closure}
…
/system
/src
/Grav
/Common
/Grav.php
379
4
Grav
\Common
\Grav
Grav
\Common
\{closure}
…
/system
/src
/Grav
/Common
/Grav.php
355
3
call_user_func_array
…
/system
/src
/Grav
/Common
/Grav.php
355
2
Grav
\Common
\Grav
__call
…
/system
/src
/Grav
/Common
/Grav.php
133
1
Grav
\Common
\Grav
measureTime
…
/system
/src
/Grav
/Common
/Grav.php
133
0
Grav
\Common
\Grav
process

Environment & details:


 GET Data empty 

data | array:3 [▶]
-- | --
__form-name__ | "contact"
__unique_form_id__ | "bkxu1QLjTWJl7XUNmvsi"
form-nonce | "f4d6f99b452e31e12aeae215fbf0ab32"

PATH | "/bin:/usr/bin:/usr/local/bin"
-- | --
HTTP_ACCEPT | "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
HTTP_ACCEPT_ENCODING | "gzip, deflate"
HTTP_ACCEPT_LANGUAGE | "en-US,en;q=0.5"
HTTP_CONNECTION | "keep-alive"
CONTENT_TYPE | "application/x-www-form-urlencoded"
CONTENT_LENGTH | "209"
HTTP_COOKIE | "phpbb3_r7hh6_k=; _ga=GA1.2.416509928.1506928439; phpbb3_r7hh6_u=1; phpbb3_r7hh6_sid=2ff0cbab672749e4e13e703a10a61134; _gid=GA1.2.1920110451.1512502655; grav-site-07cdce8-admin=fpedl634if0e48i2bt017oc0n3; grav-site-07cdce8=t0ovg7v0i1lfsftmcstlld9071; _gat=1"
HTTP_HOST | "digicamcontrol.com"
HTTP_REFERER | "http://digicamcontrol.com/contact"
HTTP_USER_AGENT | "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
HTTP_UPGRADE_INSECURE_REQUESTS | "1"
DOCUMENT_ROOT | "/home/digicamc/public_html"
REMOTE_ADDR | "89.149.62.141"
REMOTE_PORT | "57298"
SERVER_ADDR | "176.223.122.150"
SERVER_NAME | "digicamcontrol.com"
SERVER_ADMIN | "webmaster@digicamcontrol.com"
SERVER_PORT | "80"
REQUEST_URI | "/contact"
REDIRECT_URL | "/contact"
REDIRECT_STATUS | "200"
SCRIPT_FILENAME | "/home/digicamc/public_html/index.php"
QUERY_STRING | ""
SCRIPT_URI | "http://digicamcontrol.com/contact"
SCRIPT_URL | "/contact"
SCRIPT_NAME | "/index.php"
SERVER_PROTOCOL | "HTTP/1.1"
SERVER_SOFTWARE | "LiteSpeed"
REQUEST_METHOD | "POST"
X-LSCACHE | "on"
PHP_SELF | "/index.php"
REQUEST_TIME_FLOAT | 1512555306.4373
REQUEST_TIME | 1512555306
rhukster commented 6 years ago

What version of the email plugin are you using? And is SiteContactForm really your username? because it probably should be something specific to sendgrid:

https://github.com/getgrav/grav-plugin-email#sendgrid

zaszlo commented 6 years ago

Its v2.7.0. Yes that is my sendgrid username for this contact form. I copied the sendgrid config from the linked readme and replaced the specific user info from sendgrid.

rhukster commented 6 years ago

https://stackoverflow.com/questions/42558903/expected-response-code-250-but-got-code-535-with-message-535-5-7-8-username

zaszlo commented 6 years ago

The solution here refers to some gmail smtp setup, but I'm about to use sendgrid as I even sent the apikey to you privately on slack. And the problem isn't about getting “535”, with message "535-5.7.8 Username and Password not accepted, but what I get is: "", with message "".

zaszlo commented 6 years ago

Now it is working, I got the sendgrid credentials from someone and he gave a wrong username. Sorry for the noise.

i-internet commented 4 years ago

Now it is working, I got the sendgrid credentials from someone and he gave a wrong username. Sorry for the noise.

My God