>>>When I run the DTS package (using execute package) the mail gets sent. However if it is done as a scheduled task, then the jobs gets stuck at this point.
When you manually run the package, say from your workstation, it's running using your identity. When you schedule it, it uses the identity configured in the job.
Make sure that the identity used by SQL Server is NOT the local system account. Try using a Domain account that you know has access to Exchange.