Hard bounce

pull/194/head
M66B 4 years ago
parent 8709ef39fa
commit 60c31b3aeb

@ -104,7 +104,7 @@ public class EntityMessage implements Serializable {
static final Integer DSN_NONE = 0; static final Integer DSN_NONE = 0;
static final Integer DSN_RECEIPT = 1; static final Integer DSN_RECEIPT = 1;
static final Integer DSN_ADDRESS_UNKNOWN = 2; static final Integer DSN_HARD_BOUNCE = 2;
static final Long SWIPE_ACTION_ASK = -1L; static final Long SWIPE_ACTION_ASK = -1L;
static final Long SWIPE_ACTION_SEEN = -2L; static final Long SWIPE_ACTION_SEEN = -2L;

@ -3626,7 +3626,7 @@ public class FragmentCompose extends FragmentBase {
if (EntityMessage.DSN_RECEIPT.equals(dsn)) { if (EntityMessage.DSN_RECEIPT.equals(dsn)) {
if (ref.receipt_to != null) if (ref.receipt_to != null)
data.draft.to = ref.receipt_to; data.draft.to = ref.receipt_to;
} else if (EntityMessage.DSN_ADDRESS_UNKNOWN.equals(dsn)) { } else if (EntityMessage.DSN_HARD_BOUNCE.equals(dsn)) {
if (ref.return_path != null) if (ref.return_path != null)
data.draft.to = ref.return_path; data.draft.to = ref.return_path;
else if (BuildConfig.DEBUG) else if (BuildConfig.DEBUG)
@ -3741,14 +3741,14 @@ public class FragmentCompose extends FragmentBase {
} else if ("list".equals(action)) { } else if ("list".equals(action)) {
data.draft.subject = ref.subject; data.draft.subject = ref.subject;
} else if ("dsn".equals(action)) { } else if ("dsn".equals(action)) {
if (EntityMessage.DSN_ADDRESS_UNKNOWN.equals(dsn)) if (EntityMessage.DSN_HARD_BOUNCE.equals(dsn))
data.draft.subject = context.getString(R.string.title_address_unknown_subject); data.draft.subject = context.getString(R.string.title_hard_bounce_subject);
else else
data.draft.subject = context.getString(R.string.title_receipt_subject, subject); data.draft.subject = context.getString(R.string.title_receipt_subject, subject);
String[] texts; String[] texts;
if (EntityMessage.DSN_ADDRESS_UNKNOWN.equals(dsn)) if (EntityMessage.DSN_HARD_BOUNCE.equals(dsn))
texts = new String[]{context.getString(R.string.title_address_unknown_text)}; texts = new String[]{context.getString(R.string.title_hard_bounce_text)};
else else
texts = Helper.getStrings(context, ref.language, R.string.title_receipt_text); texts = Helper.getStrings(context, ref.language, R.string.title_receipt_text);
for (int i = 0; i < texts.length; i++) { for (int i = 0; i < texts.length; i++) {

@ -2431,7 +2431,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
popupMenu.getMenu().findItem(R.id.menu_reply_to_all).setVisible(recipients.length > 0); popupMenu.getMenu().findItem(R.id.menu_reply_to_all).setVisible(recipients.length > 0);
popupMenu.getMenu().findItem(R.id.menu_reply_list).setVisible(message.list_post != null); popupMenu.getMenu().findItem(R.id.menu_reply_list).setVisible(message.list_post != null);
popupMenu.getMenu().findItem(R.id.menu_reply_receipt).setVisible(message.receipt_to != null); popupMenu.getMenu().findItem(R.id.menu_reply_receipt).setVisible(message.receipt_to != null);
popupMenu.getMenu().findItem(R.id.menu_reply_address_unknown) popupMenu.getMenu().findItem(R.id.menu_reply_hard_bounce)
.setVisible(experiments && (BuildConfig.DEBUG || .setVisible(experiments && (BuildConfig.DEBUG ||
(message.return_path != null && message.return_path.length > 0))); (message.return_path != null && message.return_path.length > 0)));
popupMenu.getMenu().findItem(R.id.menu_new_message).setVisible(to != null && to.length > 0); popupMenu.getMenu().findItem(R.id.menu_new_message).setVisible(to != null && to.length > 0);
@ -2477,8 +2477,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
case R.id.menu_reply_receipt: case R.id.menu_reply_receipt:
onMenuDsn(message, EntityMessage.DSN_RECEIPT); onMenuDsn(message, EntityMessage.DSN_RECEIPT);
return true; return true;
case R.id.menu_reply_address_unknown: case R.id.menu_reply_hard_bounce:
onMenuDsn(message, EntityMessage.DSN_ADDRESS_UNKNOWN); onMenuDsn(message, EntityMessage.DSN_HARD_BOUNCE);
return true; return true;
case R.id.menu_forward: case R.id.menu_forward:
onMenuReply(message, "forward"); onMenuReply(message, "forward");

@ -575,7 +575,7 @@ public class MessageHelper {
imessage.setContent(report); imessage.setContent(report);
return; return;
} else if (EntityMessage.DSN_ADDRESS_UNKNOWN.equals(message.dsn)) { } else if (EntityMessage.DSN_HARD_BOUNCE.equals(message.dsn)) {
// https://tools.ietf.org/html/rfc3464 // https://tools.ietf.org/html/rfc3464
Multipart report = new MimeMultipart("report; report-type=delivery-status"); Multipart report = new MimeMultipart("report; report-type=delivery-status");

@ -17,8 +17,8 @@
android:title="@string/title_reply_receipt" /> android:title="@string/title_reply_receipt" />
<item <item
android:id="@+id/menu_reply_address_unknown" android:id="@+id/menu_reply_hard_bounce"
android:title="@string/title_reply_address_unknown" /> android:title="@string/title_reply_hard_bounce" />
<item <item
android:id="@+id/menu_forward" android:id="@+id/menu_forward"

@ -887,7 +887,7 @@
<string name="title_reply_to_all">Reply to all</string> <string name="title_reply_to_all">Reply to all</string>
<string name="title_reply_list">Reply to list</string> <string name="title_reply_list">Reply to list</string>
<string name="title_reply_receipt">Send read receipt</string> <string name="title_reply_receipt">Send read receipt</string>
<string name="title_reply_address_unknown">Report \'address unknown\'</string> <string name="title_reply_hard_bounce">Send hard bounce</string>
<string name="title_reply_template">Reply with template</string> <string name="title_reply_template">Reply with template</string>
<string name="title_move_undo">Moving to %1$s (%2$d)</string> <string name="title_move_undo">Moving to %1$s (%2$d)</string>
<string name="title_open_with">Open with</string> <string name="title_open_with">Open with</string>
@ -896,8 +896,8 @@
<string name="title_receipt_subject">Read receipt: %1$s</string> <string name="title_receipt_subject">Read receipt: %1$s</string>
<string name="title_receipt_text">This read receipt only acknowledges that the message was displayed. There is no guarantee that the recipient has read the message contents.</string> <string name="title_receipt_text">This read receipt only acknowledges that the message was displayed. There is no guarantee that the recipient has read the message contents.</string>
<string name="title_address_unknown_subject" translatable="false">Delivery Status Notification (Failure)</string> <string name="title_hard_bounce_subject" translatable="false">Delivery Status Notification (Failure)</string>
<string name="title_address_unknown_text" translatable="false">Your message wasn\'t delivered because the address couldn\'t be found.</string> <string name="title_hard_bounce_text" translatable="false">Your message wasn\'t delivered because the address couldn\'t be found.</string>
<string name="title_no_answers">No reply templates defined</string> <string name="title_no_answers">No reply templates defined</string>
<string name="title_no_viewer">No viewer app available for %1$s</string> <string name="title_no_viewer">No viewer app available for %1$s</string>

Loading…
Cancel
Save