- /* Organization */
- if (compose->account->organization) {
- compose_convert_header(buf, sizeof(buf),
- compose->account->organization,
- strlen("Organization: "));
- fprintf(fp, "Organization: %s\n", buf);
+ /* custom headers */
+ if (compose->account->add_customhdr) {
+ GSList *cur;
+
+ for (cur = compose->account->customhdr_list; cur != NULL;
+ cur = cur->next) {
+ CustomHeader *chdr = (CustomHeader *)cur->data;
+
+ if (strcasecmp(chdr->name, "Date") != 0 &&
+ strcasecmp(chdr->name, "From") != 0 &&
+ strcasecmp(chdr->name, "To") != 0 &&
+ strcasecmp(chdr->name, "Sender") != 0 &&
+ strcasecmp(chdr->name, "Message-Id") != 0 &&
+ strcasecmp(chdr->name, "In-Reply-To") != 0 &&
+ strcasecmp(chdr->name, "References") != 0 &&
+ strcasecmp(chdr->name, "Mime-Version") != 0 &&
+ strcasecmp(chdr->name, "Content-Type") != 0 &&
+ strcasecmp(chdr->name, "Content-Transfer-Encoding")
+ != 0)
+ compose_convert_header
+ (buf, sizeof(buf),
+ chdr->value ? chdr->value : "",
+ strlen(chdr->name) + 2);
+ fprintf(fp, "%s: %s\n", chdr->name, buf);
+ }