-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
factoring out a base considerit mailer for later use in exception man…
…agement and reporting Former-commit-id: f4aec901cbc2bac77362d162fee6ec827538d7e8 [formerly 2b0c019e52d1acfae82ea2ef8ec8803fa0383ac2] [formerly bdfdabd68913e9d8d85c382e4e873d246c8ecb0b [formerly 70a644325bd2e34f59c6b7b49257b16c5d36c361]] [formerly 6ba1a5a7ae91a380b22772bc1be74cc732eba63b [formerly aa173515cdb2d805a89cf72eaee3dfa1fbd89e22] [formerly 7eea8f8d7dbb2f983d09424343fe84ed27e9ad40 [formerly 7eea8f8d7dbb2f983d09424343fe84ed27e9ad40 [formerly ac43c687b493e6ad737f422607c757550147dfda]]]] Former-commit-id: 7fcf6b262f76d12b9afbfaffb0e1c53d4a2ab0d5 [formerly a0d05a1d11fbec227e928b9eb3394cea67799c5d] [formerly 82fe083e929a3147b64349efaffdf2de254dd6ad [formerly 716977ab954f65ab3afcb8f0130755308f9e686e]] Former-commit-id: 346d57348cd325bdde2753ed223d8ca82641c683 [formerly dd3f3f3b79ea278798707b490eed41a34bcd42bc] Former-commit-id: 4183a53b591b89c16407e9aeed9de302906d8d1e Former-commit-id: 42ebae3
- Loading branch information
Showing
4 changed files
with
21 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class Mailer < ActionMailer::Base | ||
ActionMailer::Base.delivery_method = :mailhopper | ||
layout 'email' | ||
|
||
|
||
private | ||
|
||
def format_email(addr, name = nil) | ||
address = Mail::Address.new addr # ex: "john@example.com" | ||
if name | ||
address.display_name = name # ex: "John Doe" | ||
end | ||
# Set the From or Reply-To header to the following: | ||
address.format # returns "John Doe <john@example.com>" | ||
|
||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters