Developer forum

Forum » Development » Sending Mail with DW

Sending Mail with DW


Reply

Just wanted to know if there is any way of sending an email with DW via an existing script.

 

What I'm looking for is something, like signing out with Admin/Public/ExtranetLogoff.aspx.

 

I noticed that there are some aspx files in the Admin/Public/ folder that looks like mailers

(ie FormMail.aspx).

 

can anyone tell me if its possible to send a custom mail?

 

- Sune


Replies

 
Reply
sune@fonqi.dk wrote:

Just wanted to know if there is any way of sending an email with DW via an existing script.

 

What I'm looking for is something, like signing out with Admin/Public/ExtranetLogoff.aspx.

 

I noticed that there are some aspx files in the Admin/Public/ folder that looks like mailers

(ie FormMail.aspx).

 

can anyone tell me if its possible to send a custom mail?

 

- Sune

not really sure what you want todo, but you can use the Dynamicweb.Base.DefaultSmtpServer, which is the smtp server from the control panel.
 

 

 

 

SmtpClient smtp = new SmtpClient();
smtp.Host = Dynamicweb.Base.DefaultSmtpServer;
smtp.Send(myMailMessage);

 

 

 
Reply

I you setup a paragraph with the Form module attached, check out the HTML source of the module an see what the HTML form does.

 

The FormMailer.aspx  file sends an email based on some posted parameters, but there is no documentation for this. Actually, I don't know where it's used in the standard software, so I don't know whether you may expect changing behavior to this functionality if you base your code on this.

 

aspNetEmail.dll is included in the package, but remember, if you use this assembly for your custom applications, you'll have to obtain a seperate license for this. Otherwice you'll violate the license.

 

 

You must be logged in to post in the forum