return new SMTPResponse(SMTPRetCode.SYNTAX_ERROR_ARGUMENTS,
DSNStatus.getStatus(DSNStatus.PERMANENT,
DSNStatus.DELIVERY_SYNTAX)
+ " Syntax error in parameters or arguments");
}
MailAddress recipientAddress = null;
// Remove < and >
if (session.useAddressBracketsEnforcement()
|| (recipient.startsWith("<") && recipient.endsWith(">"))) {
recipient = recipient.substring(1, recipient.length() - 1);
}
if (recipient.indexOf("@") < 0) {
// set the default domain
recipient = recipient
+ "@"
+ getDefaultDomain();
}
try {
recipientAddress = new MailAddress(recipient);
} catch (Exception pe) {
if (session.getLogger().isInfoEnabled()) {
StringBuilder errorBuffer = new StringBuilder(192).append(
"Error parsing recipient address: ").append(
getContext(session, recipientAddress, recipient))