Changeset 11778 for main/waeup.kofa/trunk/src/waeup/kofa/smtp.py
- Timestamp:
- 12 Aug 2014, 15:49:43 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/smtp.py
r11586 r11778 160 160 161 161 def send_mail(from_name, from_addr, rcpt_name, rcpt_addrs, 162 subject, body, config=None ):162 subject, body, config=None, cc=False): 163 163 """Send mail. 164 164 … … 167 167 168 168 Please note: the `from_addr` given will be used for the reply-to 169 and cc field only. It will _not_ be used for the `from` field, as170 yahoo does not allow non-yahoo servers to deliver mail with169 (and cc) field only. It will _not_ be used for the `from` field, 170 as yahoo does not allow non-yahoo servers to deliver mail with 171 171 ``@yahoo.com`` in the from-field. 172 172 173 173 The from-address set here will be: `FROM_ADDRESS` as set above. 174 175 ``cc`` tells whether we want the from-address to be CCed. This is 176 not the case by default as we easily act as an open relay 177 otherwise. 174 178 175 179 XXX: The hard-coded from-address should be changable or be … … 187 191 body["From"] = sender_addr 188 192 body["To"] = body_to.strip(', ') 189 body["Cc"] = body["Reply-To"] = reply_addr 193 if cc: 194 body["Cc"] = reply_addr 195 body["Reply-To"] = reply_addr 190 196 body["Subject"] = encode_header_item(subject) 191 197
Note: See TracChangeset for help on using the changeset viewer.