Class: ServiceDesk::CustomEmailCredential
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- ServiceDesk::CustomEmailCredential
- Includes:
- Gitlab::EncryptedAttribute
- Defined in:
- app/models/service_desk/custom_email_credential.rb
Constant Summary collapse
- SMTP_READ_TIMEOUT =
Give external providers a bit more time to process the request. Service Desk emails use native attachments, so emails might be larger in size which can increase transfer and processing time.
This might reduce error rate for SaaS customers where the service provider is located in another region which adds to the overall round trip time.
Default for other emails is 5 seconds.
For the verification email: If the credentials aren't correct some servers tend to take a while to answer which leads to some Net::ReadTimeout errors which disguises the real configuration issue.
7
Constants inherited from ApplicationRecord
Constants included from HasCheckConstraints
HasCheckConstraints::NOT_NULL_CHECK_PATTERN
Constants included from ResetOnColumnErrors
ResetOnColumnErrors::MAX_RESET_PERIOD
Instance Method Summary collapse
Methods inherited from ApplicationRecord
===, cached_column_list, #create_or_load_association, current_transaction, declarative_enum, default_select_columns, delete_all_returning, #deleted_from_database?, id_in, id_not_in, iid_in, nullable_column?, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order
Methods included from Organizations::Sharding
Methods included from ResetOnColumnErrors
#reset_on_union_error, #reset_on_unknown_attribute_error
Methods included from Gitlab::SensitiveSerializableHash
Instance Method Details
#delivery_options ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 |
# File 'app/models/service_desk/custom_email_credential.rb', line 65 def { user_name: smtp_username, password: smtp_password, address: smtp_address, domain: Mail::Address.new(service_desk_setting.custom_email).domain, port: smtp_port || 587, authentication: smtp_authentication, read_timeout: SMTP_READ_TIMEOUT } end |