Using System.Web.Mail;
MailMessage Mail = new MailMessage();
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "smtp.gmail.com");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "465");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", "2");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate","1");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "vijayfreak@gmail.com");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "Type ur passwor here");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "true");
try
{
Mail.To = "vijayfreak@yahoo.co.in";
Mail.From = "vijay@test.com";
Mail.Subject = "Test message";
Mail.Body = "Test message";
Mail.Cc = "vijayfreak@gmail.com,vijay_mckvm@yahoo.co.in";
MailAttachment m = new MailAttachment("C:\\Documents and Settings\\A\\Desktop\\images.jpg");
Mail.Attachments.Add(m);
SmtpMail.SmtpServer = "smtp.gmail.com:456";
SmtpMail.Send(Mail);
}
catch (Exception ex)
{
Response.Write(ex.ToString() );
}
Wednesday, October 22, 2008
Wednesday, October 8, 2008
Coding for Google Map Using JavaScript
use this coding with script tag
"http://maps.google.com/maps?file=api&v=2&key=abcdefg"
type="text/javascript"
Here Closing script tag
open another script tag
"function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(22.853145, 80.507813),5);
}
}"
closing script tag
"http://maps.google.com/maps?file=api&v=2&key=abcdefg"
type="text/javascript"
Here Closing script tag
open another script tag
"function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(22.853145, 80.507813),5);
}
}"
closing script tag
Subscribe to:
Posts (Atom)