app/mailers/user_mailer.rb
# Compute and return the new X-SMTPAPI header value to cause a send delay.
# Instead of doing the activation delay ourselves, ask the mailer to do it.
# See: https://sendgrid.com/docs/for-developers/sending-email/
# scheduling-parameters
Compute and return the new X-SMTPAPI header value to cause a send delay.
Instead of doing the activation delay ourselves, ask the mailer to do it.
Compute and return the new X - SMTPAPI header value to cause a send delay . Instead of doing the activation delay ourselves ask the mailer to do it .
def delay_send_header(normal_smtpapi_json)
    send_time = (Time.now.utc + ACTIVATION_MESSAGE_DELAY_TIME).to_i
    new_smtpapi = normal_smtpapi_json.dup
    new_smtpapi['send_at'] = send_time
    new_smtpapi.to_json.to_s.freeze
  end
def delay_send_header ( normal_smtpapi_json ) send_time = ( Time . now . utc + ACTIVATION_MESSAGE_DELAY_TIME ) . to_i new_smtpapi = normal_smtpapi_json . dup new_smtpapi [ 'send_at' ] = send_time new_smtpapi . to_json . to_s . freeze end
Compute and return the new X-SMTPAPI header value to cause a send delay.
Compute and return the new X - SMTPAPI header value to cause a send delay .
normal_smtpapi_json
<not_specific>