[Logo] JForum - Powering Communities
  [Search] 搜尋   [Recent Topics] 最新主題   [Hottest Topics] 熱門主題   [Top Downloads] 熱門下載   [Members] 會員列表   [Groups] 回首頁 
[Moderation Log] 管理日誌   [Register] 會員註冊 /  [Login] 登入 


JForum 2.5.0 released, download it from here.
How to configure mail sender (Spammer) with custom properties.  RSS feed
討論區首頁 » User Forum
發表人 內容
davetcc


註冊時間: 2019/3/1
文章: 4
離線
I have a situation where I'm using an SMTP server that needs some custom properties set on the mail properties (mailProps field in the Spammer class).

For now I've hardwired these additional parameters by modifying Spammer, but it may be worth looking at a more generic way of allowing custom properties to be added to the Spammer. Maybe have a custom file of additional properties or something similar.

If you think that this is a good addition, I'd be glad to do the work and submit a patch for trunk.
[WWW] [Twitter!]
udittmer


註冊時間: 2013/2/21
文章: 216
Can you give an anonymized example of the properties you would like included?

The easiest way would probably to have a new property in SystemGlobals.properties (something like "mail.smtp.properties"), and to have that made editable on the Configurations page to accept a value like "prop1=value1, prop2=value2".

Ping & Net - my free Android app for TCP/IP network diagnostics
[WWW]
davetcc


註冊時間: 2019/3/1
文章: 4
離線
Sure, In my case I required a couple of extra properties that I couldn't determine how to set:

		mailProps.put("mail.smtp.starttls.enable", "true");
		mailProps.put("mail.smtp.starttls.required", "true");


Agreed, the proposed solution sounds good to me.

Thanks,
Dave
[WWW] [Twitter!]
udittmer


註冊時間: 2013/2/21
文章: 216
Makes sense. Unless you really want to dig into the code and submit a patch, I think I can add such a feature next week.

Ping & Net - my free Android app for TCP/IP network diagnostics
[WWW]
davetcc


註冊時間: 2019/3/1
文章: 4
離線
I'm already quite familiar with that class, I had to do a bit of work on it to get my server running.

I'll prepare something in the next day or so and submit. Where do you prefer the patch.

I'm more used the git workflow these days, forgotten most of my svn knowledge.
[WWW] [Twitter!]
udittmer


註冊時間: 2013/2/21
文章: 216
Cool. There's no need to use svn, apart from the initial checkout. Please open a ticket on SourceForge and attach the patch to that: https://sourceforge.net/p/jforum2/tickets/

Ping & Net - my free Android app for TCP/IP network diagnostics
[WWW]
 
討論區首頁 » User Forum
前往:   
行動版
Powered by JForum 2.5.0 © 2018 JForum Team • Maintained by Andowson Chang and Ulf Dittmer