mail build script