|
I am unable to send mail using CDOSYS. My code is as follows: -
MailMessage msgPsw = new MailMessage();
string strBody = "How r u";
msgPsw.To = "abc@yahoo.com";
msgPsw.From = "aasstt@vsnl.com";
msgPsw.Cc = strDbMailID;
msgPsw.Subject = "Hi";
msgPsw.Body = strBody;
msgPsw.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtserver", "server IP address");
msgPsw.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
msgPsw.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendserverport", "25");
msgPsw.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "username");
msgPsw.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password");
try
{
SmtpMail.Send(msgPsw);
}
catch(System.Web.HttpException ehttp)
{
string strError = ehttp.Message + "" + ehttp.ToString();
LabelErr.Text = strError ;
}
Can somebody please help me
aasstt
|
|
|
|
|
Here's some vb 2005 code that works
Dim smtpMail As New System.Net.Mail.SmtpClient<br />
Dim emlMessage As New System.Net.Mail.MailMessage()<br />
With emlMessage<br />
.From = New System.Net.Mail.MailAddress(emailAddressTextBox.Text, nameTextBox.Text)<br />
.Subject = subjectTextBox.Text<br />
.Body = messageTextBox.Text<br />
.To.Add(emailAddressTextBox.Text) 'you can add as many email addresses as required<br />
.IsBodyHtml = False<br />
End With<br />
With smtpMail<br />
.Host = "smtp.domain.com"<br />
.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network<br />
.Credentials = New System.Net.NetworkCredential("SmtpServerLogonName", "Password")<br />
.Send(emlMessage)<br />
End With
Steve Jowett
|
|
|
|
|
Do you have installed the Virtual Mail Service in your Server?
These code is at C# language, and use the localhost (IIS) mail Service.
<br />
private void SendEmailToClient(string to, string bodyMessage)<br />
{<br />
SmtpClient smtpClient = new SmtpClient();<br />
MailMessage message = new MailMessage();<br />
try<br />
{<br />
MailAddress fromAddress = new MailAddress("YOUR EMAIL", "YOUR NAME");<br />
<br />
smtpClient.Host = "localhost";<br />
<br />
smtpClient.Port = 25;<br />
<br />
message.From = fromAddress;<br />
MailAddress toAddress = new MailAddress(to);<br />
message.To.Add(toAddress);<br />
message.Subject = "This is an Email Test";<br />
<br />
message.CC.Add("admin@yoursite.com");<br />
<br />
message.Bcc.Add(new MailAddress("moraleso@fmmb.org"));<br />
<br />
message.IsBodyHtml = false;<br />
<br />
message.Body = bodyMessage;<br />
smtpClient.Send(message);<br />
<br />
}<br />
catch (Exception ex)<br />
{<br />
Mensaje.Text = "You couldnt send the email" + ex.Message;<br />
}<br />
}<br />
keep Learning and you never will be out of date...
|
|
|
|
|
hello friends,
i am developing an sms messaging system using some third party tools and asp.net as GUI i am having an exe file
sendmsg.exe recipient=+65073223,+659988322 text="Hello"
which can be executed from command line and we can send sms to number of people
i want to execute this command from my web application on click of single button how can i do this can anybody help me
regards jabbar
jabbarsb
|
|
|
|
|
hi,
can u tell me which third party tool you are using?
are you using modem?
Reply awaited...
Nitin...
|
|
|
|
|
hi,
we are using mozat m2u and we are using modem to send sms
regards jabbar
jabbarsb
|
|
|
|
|
hi,
thanks jabbar!
even i am trying to built a sms system.
i ll take a look at this product.
thanks for ur information.
Nitin...
|
|
|
|
|
Hi,
I want to create a two level dropdown menu in an ASP.Net Application. Can any1 suggest me how to go abt in doing this? Which site should i refer to get a suitable code for it?
It is very urgent.
Thanks,
Rizzz
Rizzz
|
|
|
|
|
Hi rajiya
take it Link[^]
|
|
|
|
|
Thanks for ur reply....But my problem is that if i have a dropdownlist on my .aspx page then on collapse of the dropdown menu the menu goes behind the dropdownlist.It works fine for all other controls except dropdownlist.
Can any1 suggest me how to go about in doing this? Is there any other way to do this?
Please help me out in doing this....it's very urgent.
|
|
|
|
|
Hai friends,
I have a problem please solve me.
I have a dataset in Session["dset"].I want to find whether a datatable with name "dtable" is present in that dataset or not.If not present I would like to add to that dataset. I am doing like below.
DataTable dtable = new DataTable("dtable"); // Scope for this is
//through out the page
if (((DataSet)Session["dset"]).Tables["dtable"] == null)
{
((DataSet)Session["dset"]).Tables.Add(dtable);
}
When I execute this I am getting an exception as "Object Reference not set to an instance of an object". Please help me.
thanks,
from,
pavansagar
|
|
|
|
|
try this
ds.Tables.Contains("abc")
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Hi firends ,
I have dropdownlist on my datagrid , i want that dropdownlist's zero index as null , and i want to bind my inserted record on first index.
Please Guide me.
Thanking you ,
Param
param
|
|
|
|
|
This you can do in onitemdatabound event of the datagrid. There you have to find the control and then insert one item at the top of it, like this:
DropDownList1.Items.Insert(0, New ListItem("select", "0"))
Best Regards,
Apurva Kaushal
|
|
|
|
|
I have one page in which user will entre some location details and after that admin person should be able to display image according to that location details...
Is there any Google earth API is available?? Plz help me out for this...
Gurudatta B. Shelke
|
|
|
|
|
How to copy a file from ftp to server?
or how to copythe file from one machine to another machine???
please Help me..
Gurudatta B. Shelke
|
|
|
|
|
hai
iam having 3 images
i need to place 1 image as backgound
2 image as top right corner
3 image would be top left
any ideas highly appreciated
with regards
|
|
|
|
|
I HAVE MULTIPLE LISTBOXES,STATE LISTBOX IM BINDING FROM DB AND THE 2ND LISTBOX IS BASED ON THE USER SELECTION,THE DISTRICT LISTBOX IS BASED ON THE SELECTED STATES FROM THE 2ND LISTBOX,
ON BUTTON CLCIK IM BINDING THE DISTRICT LIST BOX BASED ON THE STATES SELECTED,BUT THE 2ND LISTBOX ITEMS ARE GETTING CLEARED SINCE THE PAGE IS GETTING REFRESHED ON CLICKING BUTTON
HOW SHUD I PROCEED ,PLS HELP ME
all the listboxes are html control and im seleting the items in javascript
kavitha
-- modified at 1:49 Thursday 23rd November, 2006
|
|
|
|
|
how can i get the values form the cells of the excel sheet.
My requriment is to upload an excel sheet and read the valuses from the sheet.
thank you
|
|
|
|
|
I have problen connecting to the access database through
asp.net,
this is the page load code
i have already set the connection strings through the
design views...
private void Page_Load(object sender, System.EventArgs e)
{
oleDbConnection1.Open();
oleDbDataAdapter1.SelectCommand.CommandText="select
country from players";
dataReader=oleDbDataAdapter1.SelectCommand.Execute
Reader();
while(dataReader.Read())
{
nameList.Items.Add(dataReader.GetString(0));
oleDbConnection1.Close();
}
}
i got an error
c:\inetpub\wwwroot\dropdown_database\WebForm1.aspx
.cs(32): The name 'dataReader' does not exist in the
class or namespace 'dropdown_database.WebForm1'
c:\inetpub\wwwroot\dropdown_database\WebForm1.aspx
.cs(33): The type or namespace name 'dataReader' could
not be found (are you missing a using directive or an
assembly reference?)
what it means and how i can overcome this problem ??
|
|
|
|
|
have you careted new object of datareader class ? if not then please first try it.
|
|
|
|
|
Hi, The problem may be with var declaration. Use the following Declaration statement.
OleDbDataReader DataReader=new OleDbDataReader ();
|
|
|
|
|
Hi guys
There is one problem with my project.
I have treeview control which loads at runtime, i mean i am fetching data from database and fill the tree.
Now my prob is that i want to select each and every node and when i select node then on right side text of that node should come in one label.
I have tried all methods of treeview but in selectednodechanged event level 0 nodes can not be selected
and in other methods if node is selected first time then it is display but if i select it again then it is not displayed
Thanks in advance
Regards,
DJ Rock
|
|
|
|
|
got it
i have done
Tree1.SelectAction = TreeNodeSelectAction.Expand
So removing that it is done
Thanks any way
Regards,
DJ Rock
|
|
|
|
|
Hai,
I’ve to store the contents in word/text documents along with the format in SQL Server table field. The document may be upto 3MB. But, the length of varbinary and varchar fields in SQL Server can be of 8000 at the max.
Any suggestions….Please welcome.
-Priya
|
|
|
|