docusealco / docuseal

Open source DocuSign alternative. Create, fill, and sign digital documents ✍️
https://www.docuseal.co
GNU Affero General Public License v3.0
5.61k stars 372 forks source link

Issues sending email to recipients - however mailbox is connected and working in some cases #193

Closed madsamjp closed 3 months ago

madsamjp commented 5 months ago

When I create a document, it fails to send to recipients with the error 550 Request failed; Mailbox unavailable (see below log)

If I self sign the document for both recipients, it sends the the signed document to both recipients just fine. After signing, I can also email myself a copy and that works just fine too.

So, the fact the email is sending just fine when I self-sign compared to trying to send out the unsigned document to the recipients suggests this is an issue with docuseal and not my mailbox.

EDIT - just to note I've tried this multiple times and get the same behaviour suggesting this is not a temporary network issue.

Here are the logs for the failed example and the successful example:

Failed log:

E, [2024-01-19T14:45:37.990885 #1] ERROR -- : [ActiveJob] [SendSubmitterInvitationEmailJob] [fdf0726a-0ec7-4585-a70f-6516bbb44aa4] Error performing SendSubmitterInvitationEmailJob (Job ID: fdf0726a-0ec7-4585-a70f-6516bbb44aa4) from Async(default) in 1391.28ms: Net::SMTPFatalError (550 Request failed; Mailbox unavailable
):
/usr/local/bundle/gems/net-smtp-0.4.0/lib/net/smtp.rb:1011:in `check_response'
/usr/local/bundle/gems/net-smtp-0.4.0/lib/net/smtp.rb:956:in `data'
/usr/local/bundle/gems/net-smtp-0.4.0/lib/net/smtp.rb:768:in `block in send_message'
/usr/local/bundle/gems/net-smtp-0.4.0/lib/net/smtp.rb:901:in `rcptto_list'
/usr/local/bundle/gems/net-smtp-0.4.0/lib/net/smtp.rb:768:in `send_message'
/usr/local/bundle/gems/mail-2.8.1/lib/mail/network/delivery_methods/smtp_connection.rb:53:in `deliver!'
/usr/local/bundle/gems/mail-2.8.1/lib/mail/network/delivery_methods/smtp.rb:101:in `block in deliver!'
/usr/local/bundle/gems/net-smtp-0.4.0/lib/net/smtp.rb:611:in `start'
/usr/local/bundle/gems/mail-2.8.1/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
/usr/local/bundle/gems/mail-2.8.1/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
/usr/local/bundle/gems/mail-2.8.1/lib/mail/message.rb:269:in `deliver!'
/usr/local/bundle/gems/actionmailer-7.1.2/lib/action_mailer/message_delivery.rb:114:in `block (2 levels) in deliver_now!'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/callbacks.rb:101:in `run_callbacks'
/usr/local/bundle/gems/actionmailer-7.1.2/lib/action_mailer/message_delivery.rb:113:in `block in deliver_now!'
/usr/local/bundle/gems/actionmailer-7.1.2/lib/action_mailer/rescuable.rb:21:in `handle_exceptions'
/usr/local/bundle/gems/actionmailer-7.1.2/lib/action_mailer/message_delivery.rb:112:in `deliver_now!'
/app/app/jobs/send_submitter_invitation_email_job.rb:7:in `perform'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/execution.rb:69:in `block in _perform_job'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/local/bundle/gems/i18n-1.14.1/lib/i18n.rb:322:in `with_locale'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/callbacks.rb:130:in `instance_exec'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/core_ext/time/zones.rb:65:in `use_zone'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/callbacks.rb:130:in `instance_exec'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/callbacks.rb:141:in `run_callbacks'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/execution.rb:68:in `_perform_job'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/instrumentation.rb:32:in `_perform_job'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/execution.rb:52:in `perform_now'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/instrumentation.rb:26:in `block in perform_now'
/usr/local/bundle/gems/activerecord-7.1.2/lib/active_record/railties/job_runtime.rb:13:in `block in instrument'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/instrumentation.rb:40:in `block in instrument'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/notifications.rb:206:in `block in instrument'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/notifications/instrumenter.rb:58:in `instrument'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/notifications.rb:206:in `instrument'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/instrumentation.rb:39:in `instrument'
/usr/local/bundle/gems/activerecord-7.1.2/lib/active_record/railties/job_runtime.rb:11:in `instrument'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/instrumentation.rb:26:in `perform_now'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/logging.rb:18:in `block in perform_now'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/tagged_logging.rb:135:in `block in tagged'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/tagged_logging.rb:39:in `tagged'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/tagged_logging.rb:135:in `tagged'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/broadcast_logger.rb:240:in `method_missing'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/logging.rb:25:in `tag_logger'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/logging.rb:18:in `perform_now'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/execution.rb:30:in `block in execute'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/railtie.rb:67:in `block (4 levels) in <class:Railtie>'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/reloader.rb:77:in `block in wrap'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/execution_wrapper.rb:92:in `wrap'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/reloader.rb:74:in `wrap'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/railtie.rb:66:in `block (3 levels) in <class:Railtie>'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/callbacks.rb:130:in `instance_exec'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/usr/local/bundle/gems/activesupport-7.1.2/lib/active_support/callbacks.rb:141:in `run_callbacks'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/execution.rb:28:in `execute'
/usr/local/bundle/gems/activejob-7.1.2/lib/active_job/queue_adapters/async_adapter.rb:70:in `perform'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:352:in `run_task'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:343:in `block (3 levels) in create_worker'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `loop'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `block (2 levels) in create_worker'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:333:in `catch'
/usr/local/bundle/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:333:in `block in create_worker'

Success log:

I, [2024-01-19T14:42:32.001922 #1]  INFO -- : [c39bda32-e944-4b55-af6c-b3faf38cf687] [ActiveJob] Enqueued ActionMailer::MailDeliveryJob (Job ID: 9af86271-deec-420e-8cdb-40d1e64dd5a7) to Async(default) with arguments: "SubmitterMailer", "documents_copy_email", "deliver_now!", {:args=>[#<GlobalID:0x00007fc46977b6d8 @uri=#<URI::GID gid://docu-seal/Submitter/7>>]}
I, [2024-01-19T14:42:32.003874 #1]  INFO -- : [c39bda32-e944-4b55-af6c-b3faf38cf687] {"method":"POST","path":"/send_submission_email.json","format":"json","controller":"SendSubmissionEmailController","action":"create","status":200,"allocations":1169,"duration":5.79,"view":0.0,"db":0.44,"fwd":"95.147.240.31"}
I, [2024-01-19T14:42:32.003147 #1]  INFO -- : [ActiveJob] [ActionMailer::MailDeliveryJob] [9af86271-deec-420e-8cdb-40d1e64dd5a7] Performing ActionMailer::MailDeliveryJob (Job ID: 9af86271-deec-420e-8cdb-40d1e64dd5a7) from Async(default) enqueued at 2024-01-19T14:42:32.001621261Z with arguments: "SubmitterMailer", "documents_copy_email", "deliver_now!", {:args=>[#<GlobalID:0x00007fc4697dd8d8 @uri=#<URI::GID gid://docu-seal/Submitter/7>>]}
I, [2024-01-19T14:42:34.915970 #1]  INFO -- : [ActiveJob] [ActionMailer::MailDeliveryJob] [9af86271-deec-420e-8cdb-40d1e64dd5a7] Performed ActionMailer::MailDeliveryJob (Job ID: 9af86271-deec-420e-8cdb-40d1e64dd5a7) from Async(default) in 2913.6ms
omohokcoj commented 5 months ago

@madsamjp we're not able to reproduce this issue - which SMTP server are you using?