List or subject
This commit is contained in:
parent
238a7fbc92
commit
b8a155caca
|
@ -687,23 +687,26 @@ function add_to_mailing_list {
|
|||
return
|
||||
fi
|
||||
if [ ${#LIST_SUBJECT} -lt 2 ]; then
|
||||
dialog --title $"Add mailing list" \
|
||||
--msgbox $"No mailing list subject was given" 6 40
|
||||
return
|
||||
if [ ${#LIST_EMAIL} -lt 2 ]; then
|
||||
dialog --title $"Add mailing list" \
|
||||
--msgbox $"No mailing list subject or address was given" 6 40
|
||||
return
|
||||
fi
|
||||
fi
|
||||
if [ ${#LIST_EMAIL} -lt 2 ]; then
|
||||
dialog --title $"Add mailing list" \
|
||||
--msgbox $"No mailing list email address was given" 6 40
|
||||
return
|
||||
fi
|
||||
if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then
|
||||
dialog --title $"Add mailing list" \
|
||||
--msgbox $"Unrecognised email address" 6 40
|
||||
return
|
||||
if [ ${#LIST_SUBJECT} -gt 1 ]; then
|
||||
${PROJECT_NAME}-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \
|
||||
-s "$LIST_SUBJECT"
|
||||
else
|
||||
if [[ "$LIST_EMAIL" != *"@"* || "$LIST_EMAIL" != *"."* ]]; then
|
||||
dialog --title $"Add mailing list" \
|
||||
--msgbox $"Unrecognised email address" 6 40
|
||||
return
|
||||
else
|
||||
${PROJECT_NAME}-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \
|
||||
-e "$LIST_EMAIL"
|
||||
fi
|
||||
fi
|
||||
|
||||
${PROJECT_NAME}-addlist -u $SELECTED_USERNAME -l "$LIST_NAME" \
|
||||
-s "$LIST_SUBJECT" -e "$LIST_EMAIL"
|
||||
dialog --title $"Add mailing list" \
|
||||
--msgbox $"$LIST_NAME list was added" 6 40
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue