Q:

discrepancy in CRX property data types in AEM

While configuring mail service com.day.cq.mailer.DefaultMailService, I came to know that SMTP port should be an integer (smtp.port=I"465").
But if I try configuring using sling:OsgiConfig node, as the CRX is not providing Integer for data type (only Decimal, Double and Long), I am not able to achieve this. 
Is there any alternative?

A:

Use String type in sling:OsgiConfig node to give the smtp:port in CRX/DE. This is internally processed by DefaultMailService.
If we see the DefaultMailService implementation smtp.port is String, is processed by annotations
@Property(intValue={25})
private static final String SMTP_PORT = "smtp.port";

