Subversion Repositories SmartDukaan

Rev

Rev 11275 | Rev 11277 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11275 Rev 11276
Line 80... Line 80...
80
			multipart.addBodyPart(messageBodyPart);
80
			multipart.addBodyPart(messageBodyPart);
81
			// Put parts in message
81
			// Put parts in message
82
			msg.setContent(multipart);
82
			msg.setContent(multipart);
83
			Transport.send(msg);
83
			Transport.send(msg);
84
		} catch (Exception e) {
84
		} catch (Exception e) {
-
 
85
			if (hasMultipleDomains(recipients)) {
-
 
86
				for (List<String> subReceipients : getReceipientsPerDomain(recipients).values()) {
-
 
87
					sendEmail(subReceipients.toArray(new String[0]), subject, body, from , filename,htmlFileName);
-
 
88
				}
-
 
89
				return;
-
 
90
			}
-
 
91
 
-
 
92
			throw new MessagingException(e.getMessage(), e);
-
 
93
 
85
		}
94
		}
86
	}
95
	}
87
	private Message prepareMessage(String[] recipients, String subject,
96
	private Message prepareMessage(String[] recipients, String subject,
88
			final String from) throws AddressException,
97
			final String from) throws AddressException,
89
			MessagingException {
98
			MessagingException {